Posted: Sat Mar 08, 2008 2:45 pm Post subject:
New Weapons
Recently, you kind folks helped me to sort out some issues with composite structures. I made the NODTechCenter generate four obelisks at buildtime and the GDI equivalent to generate four Sonic Emitters and was having a downright blast.
However, the Obelisks were using too much power. They were still Obelisks after all and even though I had made them build up with the other structure, still maintained all the attributes of a normal Obelisk (of course).
Here's the thing: I thought it would be better to make a new Obelisk and name it NODTechObelisk. This way I could change the amount of power the spawned objects needed while keeping the normal Obelisk intact. I did so by copying the Obelisk xml and putting it into the folder with rest of my NOD structures in my mod directories after naming it 'NODTechObelisk'. I changed the things in the new xml to 'NODTechObelisk' instead of 'NODObelisk, except for things that could be the same or needed to be the same (eg. models, animation). I didn't, and still haven't, added a str file because I can deal with the MISSING: text for now which I, strangely, haven't encountered as yet).
While I was doing that stuff, I wanted to change the weapon of the Tech-spawned Obelisk to one that coud engage air targets as well as ground targets. So I did... I changed other things as well but I kept with the conventions and named it 'NODTechObeliskLaserl' and saved it inside my 'NewWeaponTemplates.xml'. This new weapon name is reflected in my NODTechObelisk.xml file and I should maybe note that the weapon template xml is in the MyMod\data\GlobalData directory as I have kept to the directory structure of the game completely.
When I compile, it loads the file (..\NODTechObelisk), and says:
Warning: Unknown asset 'WeaponTemplate:NODTechObeliskLaser' referenced from 'GameObject:NODTechObelisk
When I attempt to use it in game it doesn't find or engage any targets (obviously, because it doesn't have a weapon; the compiler couldn't find it I guess, right?) I have an altered orca weapon in the same xml as the new Obelisk weapon and it comes up with no errors when compiling and seems to work fine in game.
What can anyone tell me I may have done wrong?
If you've helped me before (thanks) you've noticed my initial post can be kind of lengthy. For this I apologize. I merely hope to thoroughly convey all necessary information to obtain proper aid. Plus, if anyone reads my posts down the road then all possible avenues of the topic can be discussed. I feel this is ideal.
Anyways, as usual thanks in advance for any help. QUICK_EDIT
Joined: 02 Sep 2007 Location: My avatar pretty much gives it away...
Posted: Sat Mar 08, 2008 2:56 pm Post subject:
If everything you wrote is correct, your problem is quite simply right here:
Weapon template name:
NODTechObeliskLaserl
Weapon refrenced from your new obelisk:
NODTechObeliskLaser
They are not the same... Simply remove the last l in your weapon template name or add the l to the weapon reference in your NODTechObelisk.xml file _________________ QUICK_EDIT
unfortunately the typo was constrained to the post... I've double check my xml names three or four times... (so that's like..eight times! lol)
They are all the same. The Obelisk SHOULD fire. But it does not.
<edit>...I found the problem... It was in mod.xml. It WAS a typo. my 'NewWeaponTemplates.xml' file was called 'NewWeaoponTemplates.xml' with an extra 'o' in weapon. you see boys and girls? Even the most careful and dilligently scrutinous persons can miss something... check check and re-check!!! and get adequate sleep at night.....</edit> QUICK_EDIT
Maybe the reason that some of the names are screwy (Tech Center is Armory, tc.) is because some the programmers typos actually set the precedent. typos can be annoyingly powerful enemies QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum