Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Wed Apr 24, 2024 4:46 am
All times are UTC + 0
New Weapons
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Sat Mar 08, 2008 2:45 pm    Post subject:  New Weapons Reply with quote  Mark this post and the followings unread

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. Smile

Back to top
View user's profile Send private message
Chronosheep
Soldier


Joined: 02 Sep 2007
Location: My avatar pretty much gives it away...

PostPosted: Sat Mar 08, 2008 2:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 Wink

_________________

Back to top
View user's profile Send private message
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Sat Mar 08, 2008 3:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

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>

Back to top
View user's profile Send private message
Dutchygamer
President


Joined: 18 Jun 2005
Location: Dordrecht, the Netherlands

PostPosted: Sat Mar 08, 2008 5:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Don't bother that much about typos. EA has made lots of them in their xml files (like you said, IE, ObeliskLaserl #Tongue)...

Back to top
View user's profile Send private message Send e-mail Skype Account
Tetra Xiphos
Soldier


Joined: 05 Mar 2008

PostPosted: Mon Mar 10, 2008 7:12 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1710s ][ Queries: 11 (0.0081s) ][ Debug on ]