Random Texmod With Random Faces - Mod DB
Random Face Addons:
3000 Miles to Tokyo Mod: Moddb.com
Men of War Condemned Heroes : Moddb.com
Men of War: Vietnam : Moddb.com
-changed the percentage at which they appear so each texmod gets a somewhat equal opportunity to be used.
Works for MOW/AS/AS2/Vie-All of them. Preferrable to paste into whatever mod that uses human.inc your using at the time. The Script is free to use with, or without credit(its too simple a script to "deserve" credit IMO)
So lets say you create many skins of the same model and you don't want to manually change the skins of the soldier all the time? With Random Texmod, all you have to do is give those custom skins you made hashtags like smg.dds#1, smg.dds#2, smg.dds#3, smg.dds#4, smg.dds#5, smg.dds#hard, smg.dds#light, smg.dds#night, smg.dds#n.
Random Texmod script will give the soldier random textures once they spawn, and the soldier will keep that texture.
lets say these are your different skins you created for usa-soldier skin
original skin
usa-soldier/smg.dds
custom skin
usa-soldier2/smg.dds
custom skin
usa-soldier3/smg.dds
custom skin
usa-soldier4/smg.dds
custom skin
usa-soldier5/smg.dds
change it to this
aaaaaaaaaaaoriginalaaacustom aa customaaa custom aaa customaaa custom
usa-soldier/smg.dds , smg#1.dds, smg#2.dds, smg#3.dds, smg#4.dds, smg#5.dds
The random texmod script will call on the original skin and #'s by random, so each troop will have these different skins by random.
if you know what you are doing and are an elite modder(lol) you can just skip all of these steps and copy the code to your own human.inc under "{on spawn".
There are Three steps to getting it installed
1.Copying the Human.inc file to your mod directory(skippable if you already have it.)
2.Pasting this code under "{on spawn" in human.inc
3.Setting up your mod and activating it.(Skippable if your pasting it into an existing mod)
1.Copying the Human.inc file to your mod directory(skippable if you already have it.)
Installation: If you don't have a human.inc go to men of war/game.pak or gamelogic.pak set/interaction_entity/human.inc
make this directory men of war/mods/yourmod/resource/set/interaction_entity/
or men of war assault squad/mods/yourmod/resource/set/interaction_entity/
and drag human.inc to the interaction_entity folder you just created in your mod folder.
right-click the Human.inc you dragged and uncheck the read-only checkbox so it can be edited.
2.Pasting this code under "{on spawn" in human.inc
Now lets open up human.inc
paste it under this:
{on spawn
3.Setting up your mod and activating it.(Skippable if your pasting it into an existing mod)
now to finish creating your mod go to men of war/mods/yourmod/
create a file call it mod.info
paste this into mod.info
AS1/MOW:
{mod
{name "yourmod"} ;Must be the same name as folder name.
{desc "random texmod"}
}
AS2:
{mod
{name "yourmod"} ;Must be the same name as folder name.
{desc "random texmod"}
{minGameVersion "3.001"}
{maxGameVersion "3.201.1"}
}
start up men of war and activate the mod.
check out this men of war addon to see how this script can be put to use.
Thanks to input from Schneider, changed Tex_morph to Tex_mod and removed their timers, it makes units have their shiny speculars and bumpmaps .
known bug: on saved maps sometimes the texmods don't activate for texmodded units. fix: reload the map.
CODE:pasted under {on spawn
; place this below "on spawn" in human.inc, its at the beginning of human.inc so you can't miss it
{if rand 0.95 ;95% chance of texmod happening
{if not tagged "texmod_set"
{if rand 0.1 ;30% chance of the soldier having a #1 texmod
{delay 0.1 ;delay is a MUST
{tex_mod "1"} ;this calls on the #number in the soldier's skin folder
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>1"} ;Indicates that the soldier texture is #1
}
else rand 0.2
{delay 0.1
{tex_mod "2"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>2"}
}
else rand 0.3
{delay 0.1
{tex_mod "3"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>3"}
}
else rand 0.4
{delay 0.1
{tex_mod "4"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>4"}
}
else rand 0.5
{delay 0.1
{tex_mod "5"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>5"}
}
else rand 0.6
{delay 0.1
{tex_mod "hard"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>hard"}
}
else rand 0.7
{delay 0.1
{tex_mod "light"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>light"}
}
else rand 0.8
{delay 0.1
{tex_mod "night"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>night"}
}
else rand 0.9
{delay 0.1
{tex_mod "n"}
}
{delay 0.2
;{damage_report "body" "<c(0057fc)>n"}
}
}
{tags add "texmod_set"} ;prevents the unit from being texmodded again after the first.(so if you saved a map with texmodded units, they will stay that texture, unless you changed it yourself, it will stay that way too.)
} }
still working on it
-Sonne2 (Forgot to log in) :|
Another very interesting script.
Super tuto! Thanks! ;)
great work man, can you do this also with helmets?
And is it possible to define it to different "main" texmods. For example a winter map, with different winterskins should spawn only the winterskins-variations. But if you load a summer map, they should only use the different summerskin variations. Could that be possbile??
Thanks.
Hey Sonne2,
i played a bit with your script and had the problem, that all tex_morped units had no specular map on them, so they werent shiny with all the reflections like on the normal units.
You can fix this, if you replace the tex_morph with tex_mod. You also dont need the timer after that.
simply use:
{tex_mod "1"}
instead of
{tex_morph "1" 2}
greetings
Hi, does this script work for Call to Arms? Im getting string expected error..