Local's Unit Names and SetTeamName()
Moderator: Moderators
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Local's Unit Names and SetTeamName()
Does anyone know how to give names to units not on the normal teams?
Also, has anyone figured out how to properly use SetTeamName(). The little blurb about it in the scripting docs doesn't seem to be correct.
Also, has anyone figured out how to properly use SetTeamName(). The little blurb about it in the scripting docs doesn't seem to be correct.
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Local's Unit Names and SetTeamName()
Do you mean like killed republic rifleman instead of unit 468?
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Local's Unit Names and SetTeamName()
Yes, but also more then that if possible. I'm creating a new era. I need to change the teams' names, the unit names, and the teams' icon.woner11 wrote:Do you mean like killed republic rifleman instead of unit 468?
I copied common.sides.imp into common.sides.yex. I figured SetTeamName(1, "yex") would set the game to use the localization strings in common.sides.yex, but it doesn't. I need help figuring out how to change the names shown on the team selection screen.
I'd assume getting the team selection screen working would get the unit's to use the correct units names (the names in common.sides.yex.firstnames/lastnames). I'd also assume the reverse is true.
I've deleted everything except for common.sides.*, game.infomsg.*, and ifs.sideselect.*. The team selection screen shows the title and auto-assign, but the team names are [NULL].
I'm not using SetupTeams. Everything is done manually through SetTeamName(), SetTeamIcon(), SetUnitCount(), SetReinforcementCount(), and AddUnitClass(). Any ideas?
These two topics seem related:
Localisations
Localizing Full Side Names
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Local's Unit Names and SetTeamName()
To get it to say killed republic rifleman instead of unit 432, you need to have every unit in its own side folder. That way in the edit localize it can have its own folder per unit and can be more specific. To change the team names you do that in the entity section of the edit localize tool.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Local's Unit Names and SetTeamName()
I can't do anything that requires a map ID. It has to be able to work for any map.
-
MandeRek
- Sith Master

- Posts: 2766
- Joined: Tue Oct 02, 2007 10:51 am
- Projects :: Battlefront Zer0
- xbox live or psn: No gamertag set
- Location: Ghosting around GT
- Contact:
Re: Local's Unit Names and SetTeamName()
Well Zerted we're talking about exactly the same thing 
I set up a 'team' in level.common.sides
No succes ingame, but maybe you should replace the original core.lvl with this one then, since it's a team. Setting it up in level.common.sides mean you can make a team name, and unit names like Unit453.. All 4 asset teams are in here, so i think it must be there.. We're talking about the same teams as well, so I'll see if my core.lvl makes differences if i add them to the game's files..
I'll get back with results soon
Edit/Results: Replacing the game's core.lvl with a core.lvl created in a random map results in a fatal error: the game wont even begin! We must find another way then...
I set up a 'team' in level.common.sides
No succes ingame, but maybe you should replace the original core.lvl with this one then, since it's a team. Setting it up in level.common.sides mean you can make a team name, and unit names like Unit453.. All 4 asset teams are in here, so i think it must be there.. We're talking about the same teams as well, so I'll see if my core.lvl makes differences if i add them to the game's files..
I'll get back with results soon
Edit/Results: Replacing the game's core.lvl with a core.lvl created in a random map results in a fatal error: the game wont even begin! We must find another way then...
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Local's Unit Names and SetTeamName()
There has to be something else that's involved, as using SetTeamName() on anything other than the main four factions will default the group as locals, which is a per-map issue. SO, there has to be a script or something that causes it to point to common.sides instead of the level.locals or else ALL, IMP, REP and CIS are hard coded into the exe, like the color of the CPs.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Local's Unit Names and SetTeamName()
Yeah, I think it might be hard coded into the exe. Unless someone knows how to use ScriptCB_SetTeamNames(). I can't get it to do anything.
Anyone made any progress on SetTeamIcon()? I didn't expect to have problems with that, but I am.
I think this core.req is what you need to replace the retail core.lvl, but I wouldn't recommend using it. Make sure this core.lvl is never in a map's folder. If it is, the entire game will crash.
Anyone made any progress on SetTeamIcon()? I didn't expect to have problems with that, but I am.
I think this core.req is what you need to replace the retail core.lvl, but I wouldn't recommend using it. Make sure this core.lvl is never in a map's folder. If it is, the entire game will crash.
Hidden/Spoiler:
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Local's Unit Names and SetTeamName()
And folks, be sure to make a backup of your current core.lvl so you don't have to reinstall.
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Local's Unit Names and SetTeamName()
So, we take this and copy it in our core.req and then munge. Take that core and move into the folder with the retail core.lvl and replace it (after backing it up of course)?
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Local's Unit Names and SetTeamName()
Yep, basically. You're gonna get sound issues though. That's one file we never actually got in the modtools (the "bnk" section). When I built it back in the day I was able to do one, but it was really unoptimized and it would overload ppl's sound cards (with a really loud buzzing sound -- doesn't hurt the card, it's just annoying).
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Local's Unit Names and SetTeamName()
What does it do? Also should we then make a backup of the core.lvl in our custom map and then after doing everything with the new core.lvl override the new core lvl in our custom map with the back up?
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Local's Unit Names and SetTeamName()
Yes, but it might be easier to just backup the core.req and munge the map a second time using the backedup version after working with the retail version one I posted.woner11 wrote:should we then make a backup of the core.lvl in our custom map and then after doing everything with the new core.lvl override the new core lvl in our custom map with the back up?
All this stuff on the core.req is in another topic somewhere...
