MUD/FORD Template

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

MUD/FORD Template

Post by Merr » Wed Nov 03, 2010 4:15 am

This is a template that shows HOW-TO when adding new tiles to your campaign folder.

DOWNLOAD ZIP .... MUD_TEMPLATE

- added new folder (Tiles), with new names .... Mud_Tiles and Ford_Overlay.
- added new TERRAIN.TXT, includes new [Mud] and [Ford] entries.
- added new IDS entries in the text1 file to define new tiles.

Since I wanted the new tiles to have their own charateristics (move cost and cover bonus values), I made new entries in the TERRAIN file.
The MUD tiles are simply the MARSH tiles (6 and 7) copied over from MoreTiles.
The FORD overlay tile (59) is from the FrenchOverlays (Overlay folder), provides no cover bonus.

Hope this helps anyone making new tile characteristics for their Campaign!

Merr
Last edited by Merr on Thu Jul 14, 2011 9:27 am, edited 1 time in total.

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Wed Nov 03, 2010 4:30 am

That will work.

Thanks

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr » Wed Nov 03, 2010 4:43 am

junk2drive wrote:That will work.

Thanks
Cool ... You might want to make your own PACIFIC_TILES and PACIFIC_OVERLAY folders, just to be unique.

Also, you need to do some math when it comes to the "COVERVALUE0" ... Note how OpenGround reads this as 40, yet ingame, it show 30% :?:
It appears it shaves off 25% from that value, for reasons unknown ... Pip?

And, you'll note I kept the same tile # ... I don't know if that's needed since the tile entry references the DDS texture, ie "TEXX_0_0 5".
So, just calling it [tile1],[tile2], etc should work if you want to keep them in numeric order.

The only unfortunate thing is that we have to include the entire large DDS , which makes downloading size larger.
To go a step further, one would have to create a new DDS and place the new tiles in order and delete the rest, keeping file size down.
It's probably easier to get a tile program that does this for you, then make new TEXX entries to match.

Merr

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Tue Nov 09, 2010 2:20 pm

Bump for Pip
Also, you need to do some math when it comes to the "COVERVALUE0" ... Note how OpenGround reads this as 40, yet in game, it shows 30%
It appears it shaves off 25% from that value, for reasons unknown ... Pip?
There must be some math at work as none of the in game numbers match the terrain.txt. Lighting maybe?

I'd like to do a map making tips thread but I need to know how things like this work first.

Also, does overlay override terrain? Do objects override terrain and overlay? Or do combos multiply? (like the 2x)
You can call me junk - and type that with one hand.

pipfromslitherine
Site Admin
Site Admin
Posts: 9248
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine » Tue Nov 09, 2010 5:28 pm

It's very complex actually. The cover value you see in the tooltip is the average of two values. One is the 'best' value, which IIRC feeds into the chance to hit, while HE damage is moderated based on where the attack is coming from (based on facing) between the 0 and 1 cover values.

If you look up GetTerrainCoverValue in the scripts, you'll see it is used in quite a few places.

Overlays and objects can override the terrain value of a tile - but I believe that they just stamp a different terrain type onto it, rather than tinker with each individual value.

Cheers

Pip

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr » Thu Nov 11, 2010 3:17 am

J2J,

After a second glance at the math it appears I was wrong .... you'll need to check this before writing any tut up.

Below is what I think it is ...

In-Game % = ( 100 - ValueInTerrainTXT ) / 2 .

So, OpenGround shows a value of 40 .... 100-40 = 60 ... 60/2 = 30%

This holds true with another value I previously did for the Ford.
Example ... If the Ford value was 95, I was showing 3% in-game.
So .... 100-95 = 5 .... 5/2 = 2.5 ... rounded up = 3%.

Again, you'll have to play around and see.

Merr

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Tue Nov 16, 2010 12:09 am

Try adding cover0 and cover1, divide by 2, subtract rounded sum from 100

building 25 + 50 = 75 / 2 = 37.5 = 37

100-37=63

roads 65 + 100 = 165 / 2 = 82.5 = 82

100-82=18

rough 30 + 75 = 105 / 2 52.5 = 52

100-52=48
You can call me junk - and type that with one hand.

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Tue Dec 14, 2010 11:40 pm

I got bridging engineers to work. I used Normandy stuff.
Copied pontoon_bridge_centre.s4f to data\battle\units and added the _0 after centre
Copied bridges@.dds and the 3 others to data\battle\unittextures
Added to csv unit pontoon, type Boat, icon british scout for now, asset pontoon_bridge_centre, transport 1, can transport 1, zeroed out most everything else. Blocking 1, Bulldoze cost 4.
Added to text1 as needed
Copied my terrain text with boat

Make scenario with single width water. Add engineer. Add pontoon on engineer.

Start battle, walk to water, deploy bridge. Wait one turn, mount engineer on bridge, deploy on other side. Wait one turn and move out or pick up bridge to use later.

Once you have capture worked out, the enemy can either destroy the bridge or capture it.

The same thing can be done for an inflatable raft for commando stuff.

Tim1966 did you make a dingy for your commandos?
You can call me junk - and type that with one hand.

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Wed Dec 15, 2010 5:32 pm

Further testing. Tanks can't use it. Anything with a transport 0. It can move on the water, side to side. That's ok too. It is on pontoon barrels so you could float it along.

I can't get the destroyed graphic to show. May be a setting in the csv.
You can call me junk - and type that with one hand.

pipfromslitherine
Site Admin
Site Admin
Posts: 9248
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine » Wed Dec 15, 2010 6:02 pm

If you want a unit to go to a burned out state when killed, you need to add a tag into its animation txt file. Check out any tank really, and look for the DIETEX 0 tag, and add that to the death anim of your new unit.

Cheers

Pip

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Wed Dec 15, 2010 6:15 pm

Ah, I didn't think I needed an animation txt because it just lays there. Thanks.
You can call me junk - and type that with one hand.

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr » Wed Dec 15, 2010 6:24 pm

I think it would be a lot better if we had the ability to place "objects" by the units.

We can place tiles, like fords, across water .... remember, if you make a tile that looks like a pontoon bridge you can make it work without the trouble of adding it to the CSV as a unit.

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Wed Dec 15, 2010 6:42 pm

Now it shows destroyed. It can only be bulldozed after that. Several tests showed that it doesn't always die with one shot.

Rotate locks up the game. Movement does not.

One thing I like about my way is that the scenario designer can give the player a finite number of engineers with bridges. Lose the troops and you might deploy the bridge (raft, or whatever) on open ground. If it gets destroyed you can bulldoze it and try again if it is the only spot to put it.

Maybe I'll make a scen with the objective on an island and make you clear the riverfront to allow your engineers to safely deploy the bridges. Maybe a prestrike with a battery.
Last edited by junk2drive on Wed Dec 15, 2010 6:46 pm, edited 1 time in total.
You can call me junk - and type that with one hand.

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr » Wed Dec 15, 2010 6:43 pm

Junk,

Also ... The formula we see for the tooltip can be found in the Helpers.BSF, in the battle/scripts folder, the return value is known as the "rating".

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Wed Dec 15, 2010 7:30 pm

junk2drive wrote:Now it shows destroyed. It can only be bulldozed after that. Several tests showed that it doesn't always die with one shot.

Rotate locks up the game. Movement does not.

One thing I like about my way is that the scenario designer can give the player a finite number of engineers with bridges. Lose the troops and you might deploy the bridge (raft, or whatever) on open ground. If it gets destroyed you can bulldoze it and try again if it is the only spot to put it.

Maybe I'll make a scen with the objective on an island and make you clear the riverfront to allow your engineers to safely deploy the bridges. Maybe a prestrike with a battery.
Don't know if you caught this as I was editing while you were posting below.
You can call me junk - and type that with one hand.

tim1966
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 161
Joined: Sat Jul 31, 2010 7:15 pm
Location: Brighton, UK
Contact:

Post by tim1966 » Wed Dec 15, 2010 8:33 pm

junk2drive wrote:The same thing can be done for an inflatable raft for commando stuff.

Tim1966 did you make a dingy for your commandos?
I haven't made any commandos or dingys I'm afriad - although I like the idea! I need to give up work :lol:
Models from Tim's Surplus Store ... Established 1966 ... Open 24/7 ... closed for TEA TIME

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr » Wed Dec 15, 2010 8:36 pm

Junk,

Yeah, I saw the post but didn't have an immediate reply.

The problem with having the bridge as a "unit" is that you can't move over the bridge, it's a unit ... you can't have more than one unit per tile.

It needs to be a terrain object that can be placed by the engineer, like a tile. With regards to damage, when the bridge object reaches a certain level of damage (via object damage value), it will be removed and the underlaying tile set back to water.

Right now it can be done with a pontoon bridge made into a flat tile image, code drops the pontoon tile, and when the tile reaches a certain damage point it will be removed and replaced with a water tile.

junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive » Wed Dec 15, 2010 8:46 pm

I look forward to whatever you come up with. I like bouncing ideas around. At least I found something that can be used for something someday :shock:

Tim I had that idea from JTCS.
You can call me junk - and type that with one hand.

pipfromslitherine
Site Admin
Site Admin
Posts: 9248
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine » Thu Dec 16, 2010 3:12 am

Script controllable objects are coming, but they are quick complex, as objects are somewhat baked into the map, and their tendrils tend to extend into lots of systems... :(.

Cheers

Pip

Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr » Thu Dec 16, 2010 4:49 am

pipfromslitherine wrote:Script controllable objects are coming, but they are quick complex, as objects are somewhat baked into the map, and their tendrils tend to extend into lots of systems... :(.

Cheers

Pip
Pip,

I just thought of a work-around .... As far as I understand, effect markers are transparent to the game engine regarding having any meaning other than a visual thing ... (like a VP, only aware by the engine if it has a global assigned). Well, an effect marker with a pontoon S4F could work?

I mean, the tile is what controls movement (that's all we want to do, control movement over the water), so the "eye candy" of a flat pontoon "marker" might do the trick .... for now. Besides, tile damage can control when the "marker" (aka, pontoon marker) disappears and resets the tile back to water.... hmmm.

Might save you headaches down the road. Maybe Junk can try it later ... I'll give it a go later for sure.

Merr

Post Reply

Return to “Battle Academy : Modders Corner ”