Random Helmets -1 reply

  • 1
  • 2

Please wait...

Hail of Nails

I want to be like Revenge

50 XP

13th June 2004

0 Uploads

376 Posts

0 Threads

#1 15 years ago

How do you make random helmets appear on soldiers? I have bits and pieces, but not actually how to accomplish it. I currently have three Polish AK helmets that I would like to appear randomly on the soldiers, but am not sure how to accomplish the feat.




D-Fens

uwe bolltastic!

50 XP

2nd May 2003

0 Uploads

4,837 Posts

0 Threads

#2 15 years ago

three? hmm let's see... German m43, Polish m31, and that german aa battery crew helmet?




Englishboy

The Internet ends at GF

50 XP

9th October 2003

0 Uploads

122 Posts

0 Threads

#3 15 years ago

i forget who helped me with my helmet problem but i still the little tut that they gave me......hope it helps

This is a hard thing to explain, but here goes...

first of all, you need the rfa extractor, so you can go into the objects rfa in FH, and unpack the German desert kits, including the desert german"common/objects & common/geometries" (actually you only need the kits that you want to use + the "common" folders, but I use them all for researching different things.

anyway, take the kits that you want, open their "objects.con"'s and look at the top where it says something like "objecttemplate.addtemplate or something and then it says German_DesertHelmets, and then under that line it says objectTemplate."setrandomGeometries 9" or something directly under the line that says something about the helmets. What you should do is change the German_DesertHelmets to German_DesertHelmets3 and then delete the "objectTemplate.setRandomGeometries 9". then up at the top change the name of your kit where it says "objectTemplate.create kit 1_german ...blabla (whatever the kit's name was). make the name easy to remember and keep it descriptive and make sure that you know which spot it will go in (for simplicity's sake, if I had an assault kit that says like "1desert_assault" then I would include that number in the name so when I am writing the names in the Init.con, i won't put them in the wrong slots.

anyway, when you're done with making your kits, make a folder called "objects" and inside that make a folder called "germKit" and in germkit put the folder that you unpacked called "common" (inside there should be two con files-objects and geometries) take the manipulated kit folders and plop them into the new "objects" folder that you made. take the objects folder and put that into your level's main folder. now go to your level's init con and change the names of the german kits to correspond with the names of the new kits with the hat that you want, and then at the bottom, write this line:

"run objects/objects" (with no quotes)

now in your objects folder, make a con file (or unpack the objects folder from FH's arnhem and then copy the con files"objects" and inside the kit folders there find the con file "lol" and copy that and paste them both into your level's objects folder.) called "objects". in this con file, the lines just need run the lol files that you either will make by hand or will copy. just know that to run the lol files, the objects.con must have the exact name of the FOLDER where your new modified kits objects are in. for example: my new kit is in a folder called 1German_Leutnant_p38. then my objects folder would say this:

"run 1German_Leutnant_p38/lol"

also, no matter what else you do, you must have this line in your "objects.con"

run gerKit/common/lol

the "lol" con file is just a con file that says

run objects run geometries

which gets me to the last part of this process. Just take the geometries con, and the lol con that you hopefully copied (because that is the easiest way) and just slap them both down into the KIT folders that you messed with.

So. finally, you should have a level folder that has an objects folder with the kits that you messed with the GerKit folder, and con file that is called "objects"; each kit should have a new name, (i also rename the folders for further simplicity) an objects.con, a geometries con, and a lol con. in the gerKit folder you should have a "common" folder which holds the objects, geometries and lol cons. you have changed the init con of your file to have the line run objects/objects, and the new names of your kits. I think that's it, but if something goes wrong, just make sure that you didn't misspell anything, and if it's not that, look at what the FH devs did in Arnhem-1944 for their custom kits. that's how I learned.

when you're done with all this jazz, pack the level and play.




SacredLizard

Its cupnoodles not cuponoodles

50 XP

23rd April 2004

0 Uploads

918 Posts

0 Threads

#4 15 years ago
Hail of NailsHow do you make random helmets appear on soldiers? I have bits and pieces, but not actually how to accomplish it. I currently have three Polish AK helmets that I would like to appear randomly on the soldiers, but am not sure how to accomplish the feat.

Actually, Englishboy is partially right, but random hats is easier (I think) than just doing the one hat. Most of what English posted is right, but what I would do is this: once you have the hats that you want your guys to wear, go into the (well I guess it would be) "pol" kit for Polish guys, and open the "common" folder and open the "objects" folder. Instead of explaining the step that comes next to you with my sub-adequate communication, I will just put up here what I did for random german hats: Germans have random hats in the desert, so open up the objects file for the german desert kits. Just reading this file will speak to you volumes. Instead of deleting "setrandomGeometries 9" line in the objects file of the kit that you're making, keep it. If you're only changing the hats, you can even leave it the same altogether except renaming the hat grouping that you want, and renaming the overall kit. what you need to change is in the "ger Kit" or in your case, the "pol kit" folder. go into "polkit/common/objects" and copy the german desert kit objects info into it without deleting anything. ObjectTemplate.create KitPart German_Helmet ObjectTemplate.geometry German_Helmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_ParaHelmet ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate German_ParaHelmetHolder ObjectTemplate.setPosition 0/-0.01/0

rem *** German_ParaHelmetHolder*** ObjectTemplate.create SimpleObject German_ParaHelmetHolder ObjectTemplate.geometry German_ParaHelmet

ObjectTemplate.create KitPart German_hippack ObjectTemplate.geometry German_hippack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks1 ObjectTemplate.geometry German_hippack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks2 ObjectTemplate.geometry German_hippack2 ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks3 ObjectTemplate.geometry German_hippack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks4 ObjectTemplate.geometry German_hippack2 ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks5 ObjectTemplate.geometry German_hippack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks6 ObjectTemplate.geometry German_hippack2 ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks7 ObjectTemplate.geometry German_hippack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks8 ObjectTemplate.geometry German_hippack2 ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_hippacks9 ObjectTemplate.geometry German_hippack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_Pilot_Helmet ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate German_Pilot_HelmetHolder ObjectTemplate.setPosition 0.00/-0.0175/-0.005 rem ObjectTemplate.setPosition 0.015/-0.0275/-0.005 rem *** German_Pilot_HelmetHolder*** ObjectTemplate.create SimpleObject German_Pilot_HelmetHolder ObjectTemplate.geometry German_Pilot_Helmet

ObjectTemplate.create KitPart German_Sniper_Helm ObjectTemplate.geometry ger_Sniper_helm ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Bacpac_Big_ger ObjectTemplate.geometry Bacpac_Big_ger ObjectTemplate.setBoneName backpack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets1 ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets2 ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets3 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate Germ_DesertDAKCapHolder ObjectTemplate.setPosition -0.005/0/0 ObjectTemplate.create KitPart German_DesertHelmets4 ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets5 ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets6 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate Germ_DesertDAKCapHolder ObjectTemplate.setPosition -0.005/0/0 ObjectTemplate.create KitPart German_DesertHelmets7 ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets8 ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets9 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate Germ_DesertDAKCapHolder ObjectTemplate.setPosition -0.005/0/0 rem *** Germ_DesertDAKCapHolder*** ObjectTemplate.create SimpleObject Germ_DesertDAKCapHolder ObjectTemplate.geometry Germ_DesertDAKCap

ObjectTemplate.create KitPart Germ_DesertParaHelmet ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate German_DesertParaHelmetHolder ObjectTemplate.setPosition 0/-0.01/0

rem *** German_DesertParaHelmetHolder*** ObjectTemplate.create SimpleObject German_DesertParaHelmetHolder ObjectTemplate.geometry Germ_DesertParaHelmet

ObjectTemplate.create KitPart German_DesertHelmet ObjectTemplate.geometry Germ_DesertHelmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0

here I just copied the file that I modified for random headgear for germans outside of the desert. The most important part of the file is where you start to see "desertHelmets 1" through "desertHelmets 9". Now what you want to do is find the objects file in the common folder for the polish kits: ObjectTemplate.create KitPart Polish_Grenades ObjectTemplate.geometry Polish_Grenades ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Polish_Helmet ObjectTemplate.geometry Polish_Helmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Polish_Cap ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate polish_capHolder ObjectTemplate.setPosition -0.03/0/0 rem ObjectTemplate.setPosition 0/-0.02/0 rem nach hinten, leicht höher? rem ObjectTemplate.setPosition 0/0/-0.01 rem leicht höher? rem ObjectTemplate.setPosition 0/0/-0.03 rem leicht höher, rechts rem ObjectTemplate.setPosition 0.03/0/0 rem ganz tief rem *** polish_capHolder*** ObjectTemplate.create SimpleObject polish_capHolder ObjectTemplate.geometry polish_cap

ObjectTemplate.create KitPart Polish_DDay_Helmet ObjectTemplate.geometry Poldday_helmet_m1 ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Polish_Hip_Pack ObjectTemplate.geometry Polish_Hip_Pack ObjectTemplate.setBoneName HipPack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Polish_Assault_BackPack ObjectTemplate.geometry Polish_Assult_Bacpac ObjectTemplate.setBoneName backpack ObjectTemplate.setCopyLinksCount 0

ObjectTemplate.create KitPart Polish_Medic_hippack ObjectTemplate.geometry Polish_Medic_hippack ObjectTemplate.setBoneName hippack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Medic_helm_Polish ObjectTemplate.geometry Medic_helm_Polish ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Bac_pac_Big_Pol ObjectTemplate.geometry Bacpac_Big_us_Bri ObjectTemplate.setBoneName backpack ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart Polish_Scout_Helm ObjectTemplate.geometry US_Scout_Helm ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 then take the three hats that you want and replace the "desertHelmets 1-9" files with the polish hat geometries. DO not erase the line that contains "desertHelmets"! I'll do it for you: ObjectTemplate.create KitPart German_DesertHelmets1 ObjectTemplate.geometry Polish_Helmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets2 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate polish_capHolder ObjectTemplate.setPosition -0.03/0/0 ObjectTemplate.create KitPart German_DesertHelmets3 ObjectTemplate.geometry Poldday_helmet_m1 ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets4 ObjectTemplate.geometry Polish_Helmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets5 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate polish_capHolder ObjectTemplate.setPosition -0.03/0/0 ObjectTemplate.create KitPart German_DesertHelmets6 ObjectTemplate.geometry Poldday_helmet_m1 ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets7 ObjectTemplate.geometry Polish_Helmet ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.create KitPart German_DesertHelmets8 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate polish_capHolder ObjectTemplate.setPosition -0.03/0/0 ObjectTemplate.create KitPart German_DesertHelmets9 ObjectTemplate.geometry Poldday_helmet_m1 ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0

basically here you have the "polKit/common/objects" file. you can rename the "kitPart German_DesertHelmets 1-9" to something else, I think. Say you want to call it "Polish_HappyHelmets 1-9". just rename the helmet part in the KIT'S object file. Like this:

ObjectTemplate.create Kit 2Pol_AssaultK98Custom *(change name) ObjectTemplate.setType Assault ObjectTemplate.geometry Kit_Allies_Assault ObjectTemplate.setHasCollisionPhysics 1 ObjectTemplate.networkableInfo KitInfo ObjectTemplate.addTemplate Polish_HappyHelmets *(change name) ObjectTemplate.setRandomGeometries 9 *(Add this line) ObjectTemplate.addTemplate Polish_Assault_BackPack ObjectTemplate.addTemplate Polish_Hip_Pack ObjectTemplate.addTemplate Chutedisabler ObjectTemplate.setHealthBarIcon "Ingame/Healthbar_empty_assault_64x64.tga" ObjectTemplate.setHealthBarFullIcon "Ingame/Healthbar_full_assault_64x64.tga" ObjectTemplate.addWeaponIcon "Weapon/Icon_alliesKnife.tga" ObjectTemplate.addWeaponIcon "Weapon/Icon_No2.tga" ObjectTemplate.addWeaponIcon "Weapon/Icon_K98.tga" ObjectTemplate.addWeaponIcon "Weapon/Icon_grenadeallies.tga" ObjectTemplate.addWeaponIcon "Weapon/icon_k98grenade.tga" ObjectTemplate.setKitIcon 1 "kits/Icon_K98Pol_selected.tga" ObjectTemplate.setKitName 1 "ASSAULT" ObjectTemplate.setKitActiveName 1 "ACTIVE ASSAULT" ObjectTemplate.addTemplate K98 ObjectTemplate.addTemplate K98Grenade ObjectTemplate.addTemplate No2 ObjectTemplate.addTemplate GrenadeAllies ObjectTemplate.addTemplate KnifeAllies ObjectTemplate.aiTemplate Assault

OK? much easier than the other way, I think. Just remember to rename the kit in it's object file, remember that name and use it in the main init .con of your map, and add the run objects/objects line in the init as well. all the info is here and in English's post.




Hail of Nails

I want to be like Revenge

50 XP

13th June 2004

0 Uploads

376 Posts

0 Threads

#5 15 years ago

Thanks, that helps. Just curious, though. Do you know the function of the code: ObjectTemplate.create KitPart German_DesertHelmets2 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate polish_capHolder ObjectTemplate.setPosition -0.03/0/0 And how it differs from the regular code: ObjectTemplate.create KitPart German_DesertHelmets3 ObjectTemplate.geometry Poldday_helmet_m1 ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 I know you have to specify the Geometry in a later line of text, but my question is, why would you have to do that, instead of just specifying the DAKhat mesh directly? Not sure if I'm explaining myself correctly....




Hail of Nails

I want to be like Revenge

50 XP

13th June 2004

0 Uploads

376 Posts

0 Threads

#6 15 years ago

And also.... my first helmet is a reskin of the DAK Cap, and although it appears the first time I spawn (every time so far), no matter how many times I respawn afterwards, it never reappears, and I only have the two other helmets, a re-skin of the Polish Helmet, and a re-skin of the German Desert Helmet.




SacredLizard

Its cupnoodles not cuponoodles

50 XP

23rd April 2004

0 Uploads

918 Posts

0 Threads

#7 15 years ago
Hail of NailsAnd also.... my first helmet is a reskin of the DAK Cap, and although it appears the first time I spawn (every time so far), no matter how many times I respawn afterwards, it never reappears, and I only have the two other helmets, a re-skin of the Polish Helmet, and a re-skin of the German Desert Helmet.

First of all, what you're asking about the DAK cap "holder" I can't answer with any certainty, but I guess it is a new object made by FH devs and maybe the positioning of a hat is dependant on the "holder". In the hats which came with vanilla, maybe the "holders" are already part of a different file or something. About the problem that you're having with the hats respawning, maybe you could post some of your coding up here, because offhand, I really don't know what is the matter. Usually, its something small, so remember to double check everything that you fiddled with. Usually whenever I had a problem, it was usually with the easiest part like the naming of the kits in the init.con or something.




Hail of Nails

I want to be like Revenge

50 XP

13th June 2004

0 Uploads

376 Posts

0 Threads

#8 15 years ago

Actually, I have the random code working now. I just removed the repeating files, so my code was only for three, instead of nine helmets. Works just swimmingly now, though the randomness seems more in-order-by-number than random, but perhaps that is because I am testing the map by myself. If only I could use the same functions for outfits... Could that be done? Be really cool if it could... I just wondered what the DAK_Capholder was for, because it seemed a tad superfluous, but I haven't had time to mess with it. Maybe tomorrow. Now all I need to figure out is how to make AI planes fly overhead, and convert a Polish song for use in the game....




SacredLizard

Its cupnoodles not cuponoodles

50 XP

23rd April 2004

0 Uploads

918 Posts

0 Threads

#9 15 years ago

Yeah! I'm glad that you got it working, and I would love to hear how everything goes tomorrow with the messing around with the superfluous code, (which may turn out to be not so superfluous). As far as the random uniforms, that would be a dream come true to me as well, my friend.

AI planes is something that I have dabbled with, too, but I cant seem to get it. If you have "Mercury" from Battlegroup42's mod, they have Ju52's flying overhead, if I recall correctly, so you might find a few clues down that road. That's all I can tell you.




Hail of Nails

I want to be like Revenge

50 XP

13th June 2004

0 Uploads

376 Posts

0 Threads

#10 15 years ago

I messed around with it. For some reason the Object.Template.SetPosition function will not work when a geometry is set in the same string of code. So when the code gets changed to ObjectTemplate.create KitPart Polish_AKHelmets3 ObjectTemplate.geometry Germ_DesertDAKCap ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.setPosition -0.007/0/0 The position part is ignored, and the object will always appear in the default 0,0,0 position. On alot of things, this doesn't matter, but for the DAK Cap, some of the head clips through the hat area, and just looks strange. ObjectTemplate.create KitPart Polish_AKHelmets3 ObjectTemplate.geometry ObjectTemplate.setBoneName A ObjectTemplate.setCopyLinksCount 0 ObjectTemplate.addTemplate Germ_DesertDAKCapHolder ObjectTemplate.setPosition -0.007/0/0 rem *** Germ_DesertDAKCapHolder*** ObjectTemplate.create SimpleObject Germ_DesertDAKCapHolder ObjectTemplate.geometry Germ_DesertDAKCap But when the DAKCapHolder is used, the Position function works, and you can set it so the cap is even hovering ominously a few inches above the soldier's head. Why this is required is beyond me. Seems like it would have been simpler to just allow the SetPosition code to work in all circumstances, but then I'm not a DICE member. Later, I will have to try the same random geometry approach I used on the helmets on the uniforms... It's already done with the heads, now that I look at it, so it won't be hard to change it to apply to uniform meshes as well. It won't work on a per-class basis, but it might be fun to have different soldiers in different uniforms.




  • 1
  • 2