Internal Rename.

Internal Rename.

A dynamic game undergoing constant development and refinement, that attempts to balance playability with fresh and innovative features.

Moderator: Content Developer

User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Internal Rename.

Post by MidKnight »

It needs to be done, and there's no sense putting it off any longer.

So.
You guys decide on the pattern you want unit names to follow, and tell me exactly everything that needs to be changed (filenames, instances within files, etc.), and I'll write you a script that'll perform those operations on the files en masse.

Go go go!
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Internal Rename.

Post by Jazcash »

In terms of referencing units based on their name, just give every unit an ID and then you can have as much fun with the names as you like.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

Dont do it, extremely dangerous, will break lots of things. If its not broken dont fix it. There is absolutely no reason to rename existing stuff.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Internal Rename.

Post by Neddie »

People didn't agree on it two years ago, I doubt they will now. Don't get discouraged over it, of course.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Internal Rename.

Post by Pxtl »

If I can make one suggestion: for unit names? Units are going to get renamed in-game... better to make their unit-name descriptive in terms of function rather than use their in-game name. BOT_SAM for the anti-air robot, for example.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Internal Rename.

Post by Neddie »

We discussed that option several years ago, I wanted to go that route with a set nomenclature, some people wanted the same route with other nomenclatures, and still others just wanted the unit name. I'd be interested to see if positions have shifted.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Internal Rename.

Post by Saktoth »

FactoryRole

HoverRiot
HoverAssault

etc

Seems the cleanest way to do it, its the format i have been following.

For statics, naming is less clear.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

I suggest keeping just name:

thud
jack
bandit

etc..

Why learning 2 things.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Internal Rename.

Post by Gota »

Name would be the easiest for players that turned devs.
Facotry roles easier for people who never really played much and want to dev technical stuff, unrelated to balance.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Internal Rename.

Post by Saktoth »

The problem is some names may change, especially if we dont want certain OTA names.

Then again, sometimes roles change too, so...

The problem i have with name is that nobody knows these, the name is pretty irrelevant to how the unit is used: I think you said this yourself licho.

The reason FactoryRole or FactoryName works well is because even if you dont know the name of the unit, it massively narrows your search if you know the factory.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

Many units dont even fit roles..

And I dont evne know in which factory say roach is..

So these are moot argument.
I know roach and tick and don't know where they are or what role is it.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Internal Rename.

Post by Pxtl »

FactoryRole works if you want scripts to be brittle in an intelligent way, because if the mission says "spawn 8 BotRiots" and the role of BotRiots changes (and the internal-name is correspondingly changed) then the mission will break... appropriately.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

Often you need specific unit in missions and not just role. It can be important for story, tutorial etc..

Yet another reason to use names.
We can make names final, its easier than roles and factories.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Internal Rename.

Post by hoijui »

is it possible to have aliases?
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Internal Rename.

Post by luckywaldo7 »

The advantage of Sakoth's method it that it does organize them nicely, but I agree with Licho that it won't work nicely in all case. The jump and tank labs for example both have 2 'raider' units.

Perhaps it should be factory - name? So like

shieldthug
jumpjack
cloakglaive

etc. instead.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

I dont think that aliases would work unless there is some alias table and all systems are modified to use it. But systems are really diverse:

* spring engine - icons, textures, scripts etc
* unitsync (units for SL etc)
* miriads of widgets, gadgets
* missions
* planetwars
* modstats
* modelbase
* caedit (mass editing tool)
* guides

And probably others i cant remember.

I'm against mass rename because people won't change all those "dependencies" properly. And there is no way to do it automatically.
User avatar
maackey
Posts: 490
Joined: 02 Jul 2008, 07:11

Re: Internal Rename.

Post by maackey »

It's hard to imagine there is no way to automate the task. Even I (as nubbish as can be when it comes to code) was able to get unit names and descriptions for the website automatically using the unit definition files. (and MK made a more versatile script that I haven't actually checked yet, sorry :oops: ) Changing their internal names to external names would be trivial. Lab+role wouldn't be as easy but doable I think.

As for the dependencies... I dunno. Aren't missions based on versions of CA/ZK so renaming really shouldn't affect them. And I don't think guides use internal names - just the player seen ones.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

I assure you there is no simple way to do it. Its scattered in many diverse systems and you cannot replace stuff buried deep in code..

Don't do it unless you want to face my wrath and prompt revert when something breaks (which is 100% assured).

IF IT ISNT BROKEN, DONT FIX IT!
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Internal Rename.

Post by Pxtl »

Licho wrote:I assure you there is no simple way to do it. Its scattered in many diverse systems and you cannot replace stuff buried deep in code..

Don't do it unless you want to face my wrath and prompt revert when something breaks (which is 100% assured).

IF IT ISNT BROKEN, DONT FIX IT!
I'm still having trouble figuring out what would break if you just did s/\bcorcan\b/jumpjack/ and s/\bcorcan_/jumpjack_/ against the entire caspring source tree, but I obviously don't grok the whole thing.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Internal Rename.

Post by Licho »

Then try it and see :)
Those data are everywhere, not just in sources, in files (pictures, models, scripts), in databases, in stats files not in SVN etc..

Some names are subset of other names naive rename would likely screw source codes etc..

It would be manual work project for several days and probably only I know all the places.
Post Reply

Return to “Zero-K”