Skip navigation

Question about weapon IDs

Forum NavigationHome > Forum Index > Tread Marks > Question about weapon IDs
Level 14 Human wizard
Alignment: Good
Posted on March 19, 2006 at 8:22 pm

I plan on using the following IDs: 6001, 6002, 6003

Are any of these IDs already used? If so, then what IDs should I use?

Level 13 Human Unaffiliated Game Maker
Alignment: Chaotic
Location: England
Posted on March 20, 2006 at 11:15 am

ID?

EDIT: Nameid? Just use name = [whatever the hell ya want]

Level 14 Human gamer
Alignment: True neutral
Posted on March 20, 2006 at 11:53 am

I plan on using the following IDs: 6001, 6002, 6003

Are any of these IDs already used? If so, then what IDs should I use?


Just to elaborate on what 2ndself said...

The nameID parameter in a projectile ent only refers to what text will be called up in the death message ( Player was killed by [x])when a tank is destroyed by that projectile. The nameID number refers to Weapons.txt in Local\English (or the equivalent file in the other language folders), which contains a list of the different possible weapon death messages. The number tells the game which line to pick from.

There isn't any given set of weapon ID numbers that you need to worry about conflicting with each other or anything like in other games. However, you can run into issues with type conflicts, but it's a lot less likely. Since TM views entities by their type, if you end up having an ent with the same type and class as one in somebody else's mod, then only one of them is going to end up being used if they're both used at the same time.

Level 14 Human Sr Code Monkey
Alignment: Chaotic
Location: lost in the evil lands, of soccer-mom piloted minivans....
Posted on March 20, 2006 at 1:44 pm

The only other thing to worry about is having alot of entities with similar names (i.e. missile01 missile02 etc). If there are too many then you will get lots of hash collision errors when using the mods on a server. Names are hashed left to right, so making them different in the first few characters is a good idea (continuing my example, would be to name them 01missile 02missile etc. ).

You only need to worry about it when you have alot of them.

Level 14 Human Shadow
Alignment: Chaotic good
Location: Earth Orbit, Preparing to Attack
Posted on March 20, 2006 at 5:37 pm

The only unique numeric ID is associated with maps. If you have 2 maps with the same ID, the game will choose the wrong map (which would be fun and chaotic in a multiplayer game :D).

Level 14 Human wizard
Alignment: Good
Posted on March 20, 2006 at 5:39 pm

Just to elaborate on what 2ndself said...

The nameID parameter in a projectile ent only refers to what text will be called up in the death message ( Player was killed by [x])when a tank is destroyed by that projectile. The nameID number refers to Weapons.txt in Local\English (or the equivalent file in the other language folders), which contains a list of the different possible weapon death messages. The number tells the game which line to pick from.

There isn't any given set of weapon ID numbers that you need to worry about conflicting with each other or anything like in other games. However, you can run into issues with type conflicts, but it's a lot less likely. Since TM views entities by their type, if you end up having an ent with the same type and class as one in somebody else's mod, then only one of them is going to end up being used if they're both used at the same time.


Then that means I have to go to lines 6001, 6002, and 6003 to put those messages in. This isn't easy since I only have the demo. Although since they are all part of one weapon family, I could have them all use ID 6001, right?

Weapons are:
Wave - Motion Laser (low rapidity)
Wave - Motion Laser (base rapidity)
Wave - Motion Laser (high rapidity)

Besides that, these weapons are not entirely meant to be used in a server. In other words, it is not a recommended action towards adding this weapon pack to the servers.

Level 14 Human Shadow
Alignment: Chaotic good
Location: Earth Orbit, Preparing to Attack
Posted on March 20, 2006 at 5:46 pm

Only time you need NameID is if you want international (language-based) weapon names. Otherwise just name the weapon directly.

Also, international names aren't able to be downloaded as mods since they need the language files :)

Level 14 Human wizard
Alignment: Good
Posted on March 20, 2006 at 5:49 pm

Only time you need NameID is if you want international (language-based) weapon names. Otherwise just name the weapon directly.

Also, international names aren't able to be downloaded as mods since they need the language files :)


If I am reading this correctly, if a tank was to toast another tank with Wave - Motion Laser (low rapidity), then it would display
[Source] destroyed [Target] with a Wave - Motion Laser (low rapidity)! ,
where [Source] is the tank who used the weapon and [Target] is the tank who was destroyed by the weapon.

Level 14 Human Sr Code Monkey
Alignment: Chaotic
Location: lost in the evil lands, of soccer-mom piloted minivans....
Posted on March 20, 2006 at 8:09 pm

Correct. Your Name parameter in the projectile ent would then be:

Name = a Wave - Motion Laser (low rapidity)!

Level 14 Human wizard
Alignment: Good
Posted on March 20, 2006 at 9:08 pm

I had a slight snafu on the Wave - Motion Laser Pack. I have corrected some mistakes, including that the weapons deal more damage (per second is what I would say due to different rapidities).

Level 14 Human gamer
Alignment: True neutral
Posted on March 20, 2006 at 10:35 pm

Only time you need NameID is if you want international (language-based) weapon names. Otherwise just name the weapon directly.

Also, international names aren't able to be downloaded as mods since they need the language files :)


If I am reading this correctly, if a tank was to toast another tank with Wave - Motion Laser (low rapidity), then it would display
[Source] destroyed [Target] with a Wave - Motion Laser (low rapidity)! ,
where [Source] is the tank who used the weapon and [Target] is the tank who was destroyed by the weapon.


Sort of. The name of a weapon is handled differently from the kill messages. When you're naming a weapon (the name that appears on a player's HUD when they have the weapon), that's handled by the Weapon ent, not the Projectile. The projectile ent just controls what text shows up on the kill messages. So while you may want to have the weapon show up as Wave-Motion Laser (low rapidity) on a player's HUD, that doesn't mean that that's what the kill message will show. You can set it so that the kill message reads that the player was killed by a small WML or whatever you want.

Level 13 Human Unaffiliated Game Maker
Alignment: Chaotic
Location: England
Posted on March 21, 2006 at 10:42 am

Basically what I said originally, elliminate the nameid = line, and replace it with name = wave - motion laser , the actual name displayed when your holding it is affected by the name line in the weapon NOT the projectile.

If everybody used different lines in the Local file, then it would constantly be overwritten when you download multiple mods, and it just wouldn't work.


BTW - Get the full game for about £1, it's worth it :D

Level 16 Human gamer
Alignment: True neutral
Posted on March 21, 2006 at 12:17 pm

This isn't easy since I only have the demo.

Get the full version. How can you not have it?

Level 13 Human gamer
Alignment: True neutral
Posted on March 21, 2006 at 3:29 pm

As he said, how can you not have it. check your private messages.