Skajaquada
Crazy Engineer
- Joined
- Mar 4, 2007
- Messages
- 134
I was thinking about something meaningful half-doable thing to do in the LUA-files. Would this be impossible? I was thinking for every unit you build (maybe "same" unit or a category of units) would add a counter in their names like "Infantry, 1st Squad, 1st Company", "Infantry, 2nd Squad, 1st Company" and then to make it slightly more challanging a "Captain" unit would reset the Squad-counter and increase the Company-counter.
There's a row in SetUnitName.lua to manually set the unit's name that could be a start:
The question is just when to set it, I was thinking some onBuilt-event would be nice. Anyone seen one? I was looking for files with "build" in them but didn't find anything. There's the UnitMemberOverlay.lua that could be important. I'm saying that because I'm not sure what it does. Though it's in the UI-folder so it's probably just something with the UI
Otherwise I suppose there are the UnitList.lua and UnitPanel.lua. I was going to say we could add an additional field in the unit-tables in the database for squad and company and simply alter those files to show them. Then make UDFs to update those fields on inserts. However the unit-tables don't actually contain built units but definitions of units. Right?
Any thoughts? I was looking for similar mods for Civ 4 and saw someone had made some random-name mod but I don't think that helps.
There's a row in SetUnitName.lua to manually set the unit's name that could be a start:
Code:
Network.SendRenameUnit(pUnit:GetID(), Controls.EditUnitName:GetText());
The question is just when to set it, I was thinking some onBuilt-event would be nice. Anyone seen one? I was looking for files with "build" in them but didn't find anything. There's the UnitMemberOverlay.lua that could be important. I'm saying that because I'm not sure what it does. Though it's in the UI-folder so it's probably just something with the UI

Otherwise I suppose there are the UnitList.lua and UnitPanel.lua. I was going to say we could add an additional field in the unit-tables in the database for squad and company and simply alter those files to show them. Then make UDFs to update those fields on inserts. However the unit-tables don't actually contain built units but definitions of units. Right?
Any thoughts? I was looking for similar mods for Civ 4 and saw someone had made some random-name mod but I don't think that helps.