View topic - Internal Rename.



All times are UTC + 1 hour


Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Internal Rename.
PostPosted: 12 Dec 2010, 23:43 
Zero-K Developer
User avatar

Joined: 10 Sep 2008, 02:11
Location: In search for TheTruth (TM)
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!


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 12 Dec 2010, 23:46 
Tournaments Moderator
User avatar

Joined: 08 Dec 2007, 17:39
Location: UK - England
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 13 Dec 2010, 00:05 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 16 Dec 2010, 00:48 
Community Lead
User avatar

Joined: 10 Apr 2006, 04:05
Location: Finland, 1944
People didn't agree on it two years ago, I doubt they will now. Don't get discouraged over it, of course.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 16 Dec 2010, 04:25 
User avatar

Joined: 23 Oct 2004, 00:43
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 16 Dec 2010, 04:28 
Community Lead
User avatar

Joined: 10 Apr 2006, 04:05
Location: Finland, 1944
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 08:14 
Zero-K Developer

Joined: 28 Nov 2006, 13:22
FactoryRole

HoverRiot
HoverAssault

etc

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

For statics, naming is less clear.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 13:25 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
I suggest keeping just name:

thud
jack
bandit

etc..

Why learning 2 things.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 13:30 
Supreme Annihilation Maintainer
User avatar

Joined: 11 Jan 2008, 16:55
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 13:54 
Zero-K Developer

Joined: 28 Nov 2006, 13:22
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 14:08 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 14:43 
User avatar

Joined: 23 Oct 2004, 00:43
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 15:35 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 18:58 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
is it possible to have aliases?


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 19:03 

Joined: 17 Sep 2008, 03:36
Location: your imagination
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 20 Dec 2010, 19:24 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 22 Dec 2010, 21:48 
Moderator
User avatar

Joined: 02 Jul 2008, 06:11
Location: Vacation
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 23 Dec 2010, 02:19 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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!


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 23 Dec 2010, 02:27 
User avatar

Joined: 23 Oct 2004, 00:43
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.


Top
 Offline Profile  
 
 Post subject: Re: Internal Rename.
PostPosted: 23 Dec 2010, 02:36 
Server Owner & Developer
User avatar

Joined: 19 May 2006, 18:13
Location: Brno, Czech rep., EU, Terra, Sol, Orion arm, Milky way, Virgo supercluster
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.