Custom Side CP/Spawn Icons?
Moderator: Moderators
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Custom Side CP/Spawn Icons?
I'm hoping to make a custom icon for my side's spawn screen, cp's, etc. I've tried adding the following to my LUA:
SetTeamIcon (1, "my_icon_msh")
But do I also need to create a .req or do anything else?
SetTeamIcon (1, "my_icon_msh")
But do I also need to create a .req or do anything else?
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
* Listens to crickets chirping *
LOL. Okay, well, I figured out a little bit more. Hopefully sharing it will give somebody a good idea.
First, my thought about SetTeamIcon in the LUA was wrong. It has nothing to do with the floating CP mesh. It actually calls out a texture. I haven't quite figured out where it's used.
Second, the data/Common/mshs folder contains the four team icon meshes. They are:
com_icon_alliance
com_icon_cis
com_icon_imperial (actually in the PC folder)
com_icon_republic
Interestingly, the meshes don't appear to have ODF's. At least not in the mod tool assets. The one ODF I found was com_holo_controlzone. Which looked promising, but the icon mesh reference was commented out:
And finally, I found reference to the team icon meshes in data/Common/ingame.req. But I can't find any reference to them in any of the LUA's. So how are they called out?
LOL. Okay, well, I figured out a little bit more. Hopefully sharing it will give somebody a good idea.
First, my thought about SetTeamIcon in the LUA was wrong. It has nothing to do with the floating CP mesh. It actually calls out a texture. I haven't quite figured out where it's used.
Second, the data/Common/mshs folder contains the four team icon meshes. They are:
com_icon_alliance
com_icon_cis
com_icon_imperial (actually in the PC folder)
com_icon_republic
Interestingly, the meshes don't appear to have ODF's. At least not in the mod tool assets. The one ODF I found was com_holo_controlzone. Which looked promising, but the icon mesh reference was commented out:
Hidden/Spoiler:
- trainmaster611
- Sith Lord

- Posts: 1779
- Joined: Thu Aug 24, 2006 5:22 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Building a railway to Coruscant
- Contact:
Re: Custom Side CP/Spawn Icons?
Fyi, the cp properties are hardcoded into the game so you can't modify them.
- [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: Custom Side CP/Spawn Icons?
I've never tried changing the team icons. In the docs, SetTeamIcon is
When starting new things, start out small. Meaning figure out how to change the Rebels icon to the Imp's icon before adding in your own. Do one step at a time. Keep in mind that the icons in the team stats page (ifs_teamstats.lua) are hard coded. You can't change them unless you have a custom common.lvl
However, there is another SetTeamIcon in setup_teams.luaSetTeamIcon (team, icon)
This function sets the icon of the specified team to the specified texture.
Code: Select all
SetTeamIcon(team, name .. "_icon", "hud_reinforcement_icon", "flag_icon")
Hidden/Spoiler:
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Are you sure about that, trainmaster? In a hex editor, I can see the icon meshes in the ingame.lvl file. Maybe there's a way to re-munge or hex-edit to swap an existing icon mesh with a new one?trainmaster611 wrote:Fyi, the cp properties are hardcoded into the game so you can't modify them.
- 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: Custom Side CP/Spawn Icons?
Actually, just the team colors are hard coded. So stuff like changing blue to green (like in SWBF1) is impossible. Other than that the only hard-coded problems I've encountered are the inability to prone and not being able to strafe in a flyer.
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Doh! *slaps forehead* I just realized an easy way to do it.
1) Delete ingame.lvl from ..\data_abc\lvl_pc\ and back-up your ingame.lvl from ..\GameData\Data\LVL_PC\
2) Name your new icon mesh the same as the one you want to replace (com_icon_cis, etc)
3) Replace the existing team icon mesh in ..\data_abc\Common\mshs\ with your new one.
4) Munge your map.
5) Copy your new ingame.lvl file from ..\data_abc\lvl_pc\ to ..\GameData\Data\lvl_pc\
And here's my Wookiee icon (12 Ryyk blades):

Of course, this isn't the type of solution to ship with a map and it won't work if your LUA names a side something other than REP, CIS, REB, or IMP. But I'm happy anyway.
1) Delete ingame.lvl from ..\data_abc\lvl_pc\ and back-up your ingame.lvl from ..\GameData\Data\LVL_PC\
2) Name your new icon mesh the same as the one you want to replace (com_icon_cis, etc)
3) Replace the existing team icon mesh in ..\data_abc\Common\mshs\ with your new one.
4) Munge your map.
5) Copy your new ingame.lvl file from ..\data_abc\lvl_pc\ to ..\GameData\Data\lvl_pc\
And here's my Wookiee icon (12 Ryyk blades):
Of course, this isn't the type of solution to ship with a map and it won't work if your LUA names a side something other than REP, CIS, REB, or IMP. But I'm happy anyway.
- 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: Custom Side CP/Spawn Icons?
Sweet lovin! Hopefully we can crack the ability to do it for custom sides. Just out of curiosity, post the LUA you're using on this era, I want to see if it's looking for something that I think makes in IMP/ALL/REP/CIS
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Here's the LUA, Teancum. The new icon was actually given to the CIS side. No icons show up in-game for the RKW side. What are you thinking?
Hidden/Spoiler:
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Custom Side CP/Spawn Icons?
Sweet Mama!
KotOR era icons here I come!
KotOR era icons here I come!
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Yup. Now if we can only figure out how to do it without changing the icons in every map...
-
Caleb1117
- 2008 Most Original Avatar
- Posts: 3096
- Joined: Sun Aug 20, 2006 5:55 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: X-Fire: caleb1117 ಠ_ಠ
Re: Custom Side CP/Spawn Icons?
Oh, yea, there is that.ROCKET wrote:Yup. Now if we can only figure out how to do it without changing the icons in every map...
But this is still pretty sweet, good job!
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Custom Side CP/Spawn Icons?
Go ahead and try creating duplicates of the icon files for whatever side, rename them, and add them to the ingame.req. As long as you're adding content and not replacing content, you shouldn't have to affect previous/stock maps. That would also allow for a standard KotOR/whatever icon to be created for use in whatever.
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Sure, you can add lines to the ingame.req. But how does the game then know to use that info for your side's icon? I haven't been able to find anything in any of the scripts that defines which icon meshes are assigned to which side. Any ideas, anyone?
-
FragMe!
- Gametoast Staff

- Posts: 2244
- Joined: Sat May 13, 2006 12:34 am
- Projects :: Not sure keep changing my mind.
- xbox live or psn: No gamertag set
- Location: Origin name GT_FragMe
- Contact:
Re: Custom Side CP/Spawn Icons?
there is this from the setup_teams.lua
Code: Select all
local name = string.lower(name)
SetTeamName(team, name)
SetTeamIcon(team, name .. "_icon", "hud_reinforcement_icon", "flag_icon")
SetUnitCount(team, side.units)
SetReinforcementCount(team, side.reinforcements)-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Yes, FragMe, the SetTeamIcon line is what I first thought of to play around with. But everything I've read and seen shows that it calls out a texture (for the HUD?) and not the icon mesh for CP's.
- [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: Custom Side CP/Spawn Icons?
Check out this topic for the answer: http://www.gametoast.com/forums/viewtop ... 27&t=12600ROCKET wrote:Yup. Now if we can only figure out how to do it without changing the icons in every map...
-
ROCKET
- Private First Class
- Posts: 80
- Joined: Tue Aug 23, 2005 1:11 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Northern California
Re: Custom Side CP/Spawn Icons?
Very cool, [RDH]Zerted! Thanks!
I guess we still can't assign icon meshes to non-standard side names, but we can just use the standard names for custom sides to be able to ship maps with custom cp icons.
I guess we still can't assign icon meshes to non-standard side names, but we can just use the standard names for custom sides to be able to ship maps with custom cp icons.
