Post tutorial Report RSS Creating A Mod

This tutorial will go through all steps necessary in order to create a basic map & mission mod for Soldiers: Heroes of World War II.

Posted by on - Basic Starting a mod

Taco's Basic Modding Tutorial

1. Modding Installation

You must have a functional & clean copy of Soldiers: Heroes of World War II installed, preferably version 1.28.3E (newest I know of). I recommend having a second installation of the game purely for modding purposes as the editor can over-write files & it will dump any new files straight into the installation. If you do not install a second installation you may have issues with multi-player in addition to not being able to truly test your mod, as files might be missing in the mod itself that you have on the installation.

2. The Tools

You will require a text editor & a map/mission editor for this tutorial. I recommend Notepad++ as the text editor & the (official?) GEM editor as the map/mission editor. You will also need a un-packing tool such as 7-Zip.

Notepad++ & 7-Zip are easy to download & install, if you manage to have problems with them you should not even attempt modding. When installing the GEM editor you must make sure you select the correct installation target, for me it is "C:\Soldiers - Heroes of World War II", it is the game's root folder, the one with "Soldiers.exe" in it.

3. The Mod Itself

In order for a mod to function in SHoWW2 you need 2 things: The mod's folder & it's info file. Create a new folder called "MyMod" & put a new .txt file in it & re-name it "info.mod". Open info.mod with a text editor, and put this in:

{mod
{name "Not A Mod"}
{desc " Tis a mod for 1.28.3E, it basic. \n You create new lines with the slash-n combination."}
{version "Mod Version 1"}
}

Now you must put your indisputable masterpiece in "*\Soldiers - Heroes of World War II\mods\". If you do not have a "mods" folder in your root game folder, you must create one.

You should now be able to see & activate your mod in-game. I strongly recommend you always have the mod you're currently working on activated whilst editing it, otherwise your editor may crash on start-up & you won't have access to any content the mod has (like new missions).

4. Testing Mission

Run "start_editor.bat" NOT "soldiers_editor.exe". The actual editor executable will crash, you must open with the .bat. First thing I suggest you do entering the editor is hit F2, esc, save-as, then name the map file "mymod\resident" (note the \ NOT /). Then hit F3 & save-as "test". Exit the editor, edit "start_editor.bat", make it look like this:

rem to start editor type soldiers_editor.exe -edit :
soldiers_editor.exe -edit mymod\resident:test

Every time you open the editor you will now have a test environment to test all sorts of things in. Feel free to save any changes you do to this map & mission for convenience. This is very useful for quickly trying out exact damages, unit behaviors & when developing new items & weapons.

5. Flat Map

Now to creating a new map. I suggest you hit F2, save-as "mymod\flat". Click entities tab, uncheck "clip camera position" & then clear out the entire map of entities, use the Delete key. You must hold ALT whilst selecting certain entities, such as bridges.

Click land tab & select Polygons. Press + & - till you get a good brush size. Left mouse button all the black spots that tear up the land in the middle. You may need to right mouse button to tear it in some spots in order to fill it, it's finicky.

When the gaps are filled, select Heights Hold ALT whilst brushing around to level the terrain. You may want to check "heightmap" in order to make sure you leveled everything.

When you leveled the map, select Textures & CTRL click the ground to get a sample of it. Now max out the sharpness & paint everything the same texture.

When textured, select Terrains & select "grounds". Paint the entire map in "grounds".

When done making everything ground, select Colors & CTRL-click a normal-looking spot to get neutral colors. Paint everything with it.

You can now go to clip tab, check "clip camera position" & change the settings to what you want. You should see the boundaries when in clip mode, the cyan one is the player-view one, yellow is the playable area boundary (which the AI ignores). Put those 2 boundary lines near the edges of the map, but within it, use the Polygon tool if you want a square map.

When you are done with all of this, save the "flat" map, you now have a base to start making maps from now. Make sure to use "save-as" when you create new maps in the future to save this one.

6. New Map

It is now time to create a wholly new map, your map. Scroll through all the entity menus, brush tools, etc & familiarize yourself with everything. Once you feel you understand it well enough, load the flat map you made & save-as "mymod\mymap". Do whatever you want to it, create hills, set down forests, make structures, etc.

Some pointers:

  • Water altitude controls how high up the water is.
  • water terrain turns the area into a water zone, regardless of how it looks. Only water terrain acts like water. ground for example will never behave like water, even if you put water effects on it.
  • For units to be able to go in and out of water, like a beach, you must first smoothen the ground enough & then use the water terrain tool. Beaches have light blue color instead of dark blue.
  • swamp terrain kills all units that enter it, it is the quick-sand from the swamp mission.
  • Most vehicles drive better on roads.
  • Make sure to use grass terrain instead of ground on actual grass, otherwise vehicles will kick up absurd amounts of dirt when driving over grass.
  • When you CTRL-click textures, you do not copy it, but rather you get access to the actual texture. This means you can change textures directly without having to paint over them if you choose the wrong texture.
  • Textures have both right & left mouse button versions, which will blend when next to each-other.
  • Shift smoothens height.
  • Right & Left mouse buttons lowers & heightens the height.
  • Don't forget about the "stamps", like roads, curbstones, etc.
  • Most buildings are split into multiple pieces, it takes time to get used to setting them up.
  • You can use CTRL+C & CTRL+V to copy & paste most entities, including fully made buildings.
  • Many buildings & flora have texture varieties in "view .texture".
  • Use save-as to make copies of your work, as there are ways to corrupt maps, so you don't lose all the progress.

7. New Mission

When you are pleased with your map, it is time to create a mission for it. When on your map, hit F3 & save-as "m1". Press 1 (view) & click Setup. Make it 7 players for coop.

Click Diplomacy. Players 1-4 should be green (allies) for coop. Player 5 can be red (enemy) as an AI enemy. Player 6 can be used as a friendly/neutral AI, put him yellow (neutral, so not to be confused with players) for 1-4 & red for 5.

Now click 2 (entity) to put down whatever units you want. You can use the numpad keys to switch between which player they spawn as, but it can be changed manually on the unit's Properties tab (lower right when selected). Player units should start as player 1, even for coop.

When making infantry, use whatever "-human" base you want, then scroll down Properties tab to "breed", select whatever "breed" you want. Without a breed units won't have proper stats. You may manually change the inventory after you've selected the breed.

Players' units should have "brain .control" put on user. This will make them use up ammunition as well as be able to swim. They should also have the tag "pl_assign" for coop player assignment. CTRL+T for tags, make sure to click both Add & OK.

Click "ables" & check "personage" for player units if you want them to be able to be revivable. Check "ally_crew" if you want them to be able to enter allied vehicles.

To create waypoints, click 4 (waypoint). Click add & add one, then right click & select the one you created. When you create more now they are linked. You can give custom commands to waypoints in "Commands" section, those will trigger when the unit moves over the waypoint (ONLY those assigned to walk to that waypoint, simply walking over it will not trigger it). Failing to arrive to a waypoint won't trigger it's commands.

To make zones click 5 (zone). You can create either circles or polys. Polys can be more advanced, but also finicky to deal with.

To make triggers (such as making units follow waypoints), click 6 (trigger).

To make a good start-up trigger that will always work (condition-less triggers at start-up won't always work), make an event with "set" mode & 1 delay. Then make another trigger with the condition of the event, this trigger should trigger 1 second after start-up & should always work.

To make units follow waypoints at start, put in a "actor_to_waypoint" command in a start-up trigger. "Selector" are the units effected, I recommend mids for few units or tags for many. Drop makes them forget what they were doing. Waypoint uid is the number of the waypoint you want them to follow.

For a fail-trigger, first put the tag "playerunits" on all player infantry. Make a trigger with the "actor" condition. Actor condition should have "playerunits" tag in selector & "not_dead". Limits should be ".>=" & ".<=0". Now put in gameover command & add music command if you want.

For a basic "kill all enemies" win trigger, copy the fail-trigger. Remove "playerunits" tag from the win-trigger & put in "player 5" in the player section instead. Change gameover "loose" to "win" & if you made a music command, change it to the win tune.

For mission objectives, click "Tasks" in 1 (view). Add a new task, "name" won't show up for players, name it whatever makes it easy for you. "desc" is the actual text players see, put something in directly, don't use the "..." button. Primary makes it a primary objective, non-primary tasks automatically become optional. State is whether it is shown, completed, failed or hidden, "-" means it shows. "point" requires a pointer entity with the same tag. I always leave "team" empty.

Click 9 (environment) to select what weather you want. Edited environments don't stick, they will revert when you load the mission again.

8. Transferring Files

All maps & missions you create will be put straight into the installation itself, NOT your mod folder. You must now go fetch all the files & put them into your mod folder. Make sure to create the folder structure as well, not just the files.

Your landscape files, which are the files for the land itself, are located in "\Soldiers - Heroes of World War II\Resource\entity\landscape\map\120_3m\mymap.mod". "120_3m" might differ. The files should be placed in "\Soldiers - Heroes of World War II\mods\mymod\resource\entity\landscape\map\120_3m\mymap.mod". Change the "120_3m" part if it differs.

Your map & mission files are located in "\Soldiers - Heroes of World War II\Resource\map\mymod\mymap". Put them in "\Soldiers - Heroes of World War II\mods\mymod\resource\map\mymod\mymap".

9. In-Game Availability

In order for the mission to show up in-game you must copy & then modify said copy of a file. Go to "\Soldiers - Heroes of World War II\Resource\Patch" & open "1.pat" with 7-Zip or equivalent. Get the file "games.reg" from "\1.pat\set\registry\". Put "games.reg" in "\Soldiers - Heroes of World War II\mods\mymod\resource\set\registry".

Open "games.reg" with Notepad++ or equivalent. Find "{"5. Bonus missions"". Add this:
{"MyMission"
{name "mission/b_8/name"}
{coopBreed "usa.infantry_smg"}
{scene "mymod/mymap:m1"}
}

Right below this:
{scene "single/town_officer:0"}
}"

Replace the "coopBreed" with whatever breed you prefer.

Add "{"mymod\mymap" 1}" right below "{"single\hutor_chepel" 0}". Replace 1 with the correct number for the mission you made. Refer to the number list above that segment.

Now get the file "mission.lng" from "localize.pak". Put it in "\Soldiers - Heroes of World War II\mods\mymod\resource\set\text".

Add this:
{"b_8"
{"name" "My Mission"}
}

Right below "{tags "english"". These files & tweaks will make the mission show up properly in-game as a bonus mission.

10. Preview & Mini-Map

To get a preview in the multi-player menu, take a screenshot in-game, then crop & scale it to 200x150 & save it as myprev.tga. Create a text file & re-name it "preview.ebm", put it in "\Soldiers - Heroes of World War II\mods\map\mymod\mymap\". Put this in "preview.ebm":

{bitmap
{Filtering 1 }
{AlphaChannel 0 }
{Blend None }
{Frame "myprev.tga" }
}

In order to have a mini-map back-ground, you must go into the editor, load the map & only the map, disable camera clip & zoom out till you can see the entire map. Now neatly line the map up as squarely as possible, take a screenshot & crop out everything that is not the map. Scale down the image with locked ratio to either "*x350" or "350x*". One dimension should be 350, other should match with it's down-scale & ratio. Save it as "mymapminimap.tga". Put it in "\Soldiers - Heroes of World War II\mods\mymod\resource\interface\minimap". Make a text file and re-name it "mymap.ebm" in the minimap folder. Open "mymap.ebm" and make it look like this:

{bitmap
{Filtering 1 }
{AlphaChannel 0 }
{Blend none }
{Frame "mymapminimap.tga" }
}

11. Finishing Touches

Now your mission mod should be fully functional & coop ready with preview and all. However, before you spread it like the plague all across the world, first create a readme text file, detailing how to install it. The readme should at least mention the need of a "mods" folder & that you put "mymod" folder in it.

Now feel free to compress it using 7-Zip or an equivalent & send it to wherever.

Comments
dgn
dgn

Good job, Maestro !

Cheers.

Reply Good karma Bad karma+3 votes
herrfriedrichmarx
herrfriedrichmarx

Hi,I have a great interest in S:HWW2 and the SOE expantion mod.
after the first time i meet this pearl when i was just a freshman, my love for this game never fades, instead it grows by the time.
now finally i want to accustom this game to the shape i like most, i had seen many movies
and played a lot of game related to the WWII. i want to duplicate those facinating scenes
in to the s:howw2, but i have some difficulties when using the editor.

so i leave a comment here wishing my puzzles could be solved:
how should i rotate the fixed object(like construction but not human)in the editor?in gem2 engine the corresponding keys are Z,X,C. but it wont work in gem1 engine. i found
a option in F2(landscape editor)that might be related to it, the ROTATION LOCK ANGLE option. but no matter what nummer i put in it just wont budge.

thank you very much!

Reply Good karma Bad karma+1 vote
herrfriedrichmarx
herrfriedrichmarx

I have already figured out that i can rotate entity by using rightkey while pressing CTRL.

but there are still some problem left,the editor always come up with this paticular error report :

Exception
expression failed: id>=0&&id;<types.size()(epp_types.cpp,219)

this nummer 219 after the comma never changes,i dont know what does this means,the editor crashs right after this error report every time.have you ever faced with this same problem?or have you already figured out what could the possible cause be and the right way to deal with it? please let me know if you have any answer, thanks!

Reply Good karma Bad karma+1 vote
Saiboht Author
Saiboht

When you get an exception error the game always shuts down afterwards in my experience. I don't know what each code means, but you should have soldiers.log in your main game folder with more detailed information about what happened. The stuff furthest down are the most recent events.

Since I don't have that error myself I can't really help you without more information.

All I can say is in my experience nearly all of the exception errors I have had are from errors in my modding.

Reply Good karma+1 vote
herrfriedrichmarx
herrfriedrichmarx

Thank you so much for your reply!

after studying the gem 1 engine tutorial for quite some time and with the help of many instructions on the internet i now know how to use the editor.
but there is a repeating error that i have no idea why it happens, but it comes up very often and abruptly.

expression failed:_restitution>=0&&_restitution<1.0f
(econtactpoint.cpp,144)

Reply Good karma Bad karma+1 vote
herrfriedrichmarx
herrfriedrichmarx

for it has mentioned the restitution, it make me to assume that an unlegit collide had happend .which makes the velocity differential after the collide even greater than the one before the collide thus violate the physical law and the mathematical principles this engine based on . that could be part of the reason that the program emphasize the --"restitution>=0&&_restitution<1.0f".
but that's how the things getting incomprehensible,in many occasions when the problems shows up, there were definitely no collide or any other sort of interaction between objects on the whole map. but this problem just show it self unstopping. it crashed both in game or in editor because of this particular error.

so have you ever come across with this error? in what occasion could this happen? what could the possible cause be? is there solution possible?

thanks again and being desperate for you reply :)

Reply Good karma Bad karma+1 vote
Saiboht Author
Saiboht

I don't recall having had that error & I'm honestly clueless at this point. All I can say is that all types of projectiles & most items & debris have physics on them, in case you didn't take that into account.

The only thing I know of that frequently crashes my editor is the cover editor "cover [8]". I have no idea what causes it so I typically just avoid it. I also have issues with "-fauna", or animals, they sometimes also cause crashes for some reason.

I should mention that I'm on Windows 7 64-bit & set my compatibility options to "Windows XP (Service Pack2)" on both "soldiers_editor.exe" & "Soldiers.exe".

Also, are you playing/editing on a fresh installation, or are you using mods or have modded yourself?

Reply Good karma+1 vote
herrfriedrichmarx
herrfriedrichmarx

the restitution problem i mentioned was solved, this paticular error only appears in editor mode, since it wont happens in normal gameplay so still can consider it as solved.

Reply Good karma Bad karma+1 vote
herrfriedrichmarx
herrfriedrichmarx

making a lot progress from last time :D

i managed to verwirklichen the dream i have for long time:
to use the buy soldier panel in the campaign, for example, in the first mission of sovietunion "chepel", i can now without using the initial forces the computer assigned to me,but rather buy what ever soldier i want to buy to play the game.
by doing so just simply add a "mappoint" and "startpoint" in the mission editor. then go out and open the .mi file, replace the mappoint and startpoint with the functioning file from the normal multi playermap. then TA DA, it works!(still need to open this map in battlezones mode)

this new game style makes the game 1000times more attractive!

Reply Good karma Bad karma+1 vote
herrfriedrichmarx
herrfriedrichmarx

still have some problem though :(

after i replace the .map and .mi file in to a random multiplayermap folder in the MOD folder to play the new game mode i made for myself, some wierd problem shows up.

exception:
registry node 'multiplayer/scenes/az_dnieper/size' not found (eregistry.cpp, 287)
----------------------------------------------------------------------------------
>file"/map/multi/dnieper/map"
........

i come across with this problem once,but after i found that i should put the corresponding(entsprechend) landscape file in the entity folder it was solved.

but this time the problem cant be solved in this way,even i replace the file with original one the error is still there.what could the reason be?im not familiar with the registry file, could you please write more guidence about the registry?

and btw what is this 'multiplayer/scenes/az_dnieper/size'? i cant find this file anywhere. maybe it was stored in a registry file or sth like that?

thanks for your replies!

Reply Good karma Bad karma+1 vote
Saiboht Author
Saiboht

The registry files are rarely to blame for errors in my experience, unless they have to do with mission files. Most registries are more like collections of many other files that get merged together when the game launches. However, in your error it doesn't seem to blame the registry directly, as it should've pointed to a registry file then.

So if you didn't edit any registry files it's unlikely they are causing the issues, but rather the ">file"/map/multi/dnieper/map"" in your case.

I suggest you double check everything checks out exactly as it should be with the map files.

For example if you look at "resource\map\taco\graben\map":

You can open map files using text editors & if you open your map file you it should have an entity entry saying something like:

" {Entity "120_3m:graben" 0x0
{Position 1181.1 1181.1 0}
}"

In this case the landscape file corresponds to "120_3m.net" & "plane01.ply" that are in "resource\entity\landscape\map\120_3m\graben.mod".

Make sure that the folder structure is correct as well, including the "\120_3m" part or whatever it may say for you as well.

It may also be that you are trying to open a mission that don't have the map file in the same location as the mission file. In this case open your registry file that handles multiplayer missions & look for your entry. In my example it looks like this:

" {"Losheimergraben"
{name "mission/t_16/name"}
{coopBreed "1ger.inf_rifle"}
{scene "taco/graben:m00"}
}
"

Note that my example refers to a singleplayer/coop mission, so it may look different. The part you are looking for however is the "{scene "taco/graben:m00"}" bit, make sure this is correct (not the same as mine, bur rather as it should be for you).

About the last question, it might have something to do with the "{scene "taco/graben:m00"}" bit i mentioned above. I don't really know however, as I haven't done anything with multiplayer maps, hence why my example is of singleplayer/coop. I know scenes can also be used for background scenes, but I doubt it's that.

Reply Good karma+1 vote
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Tutorial
Browse
Tutorials
Report
Report
Share
Related Games