Naming Conventions (revisited)

A community Age for Uru.

Moderator: Aloys

Naming Conventions (revisited)

Postby Paradox » Sat Jan 26, 2008 11:44 pm

The original guidelines stated the following:

  • All object names begin with sNNN, where NNN is your shell/page number. For example, the name of an object in shell 111 would begin with s111.
  • All materials begin with sNNN.
  • All texture records begin with sNNN, and all texture files begin with sNNN.
  • All objects are within the bounds of your shell walls. (The walls are on the layer 4 of your shell Blend file)
  • All Python scripts begin with sNNN, and all classes within the scripts begin with sNNN.
  • If you have any global variables, declare them within a Python file named sNNNGlobals.py. This will put them in the sNNNGlobals namespace.
  • If your Python classes are subclasses of ptModifier, then set self.id equal to 189NNNX, where NNN is your shell number, and X is a number from 0 to 9 - this depends on how many ptModifier subclasses you have.


Now, I think this needs to be slightly revisited.

My strategy so far has been to prefix everything with my shell number (410).
So I have 410Wal, 410Flr, 410Tree, 410BStr, etc. All of my textures start with 410- and all of my materials start with 410-. When you look at my .prp file in PRPExplorer, everything starts with 410.

Except the few materials that are known to be global. The shell wall, the shell roof, the stairs, the lights, and the grass are used by all of the shells and are located in the age's _Textures.prp file. (if this is going to change, let me know Aloys).
I exported all of the material and texture objects from a clean install of Ahra Pahts, and imported them into my completed shell file. They don't start with 410, but rather with MatSh-. Unless this will cause a problem with other shells, I was planning to leave them as they were. I do want to know however if it would be better to rename absolutely every object in the .prp to use the 410- prefix.

Another issue is sounds. Sounds traditionally start with the age as a prefix. Which works well in Ages that don't have a tonne of developers all working on different things. Currently my sound files start with Pahts410-. Looking at Cyan's files, it might be better to use a name such as pahts410_main.ogg rather than Pahts410Main.ogg. We're probably also going to need to address the number of sounds that a shell can contain/distribute.

I haven't used any Python in my shell, and I don't intend to, so I can't offer suggestions there; however I would like to propose the following new shell naming guidelines:
  • All geometry objects are named beginning with the 3 digit shell number.
  • All materials and meshes are named beginning with the 3 digit shell number.
  • All textures are named beginning with the 3 digit shell number.
  • All colliders, regions, softvolumes, soundemitters, seekpoints, etc. are named beginning with the 3 digit shell number.
  • All objects defined using AlcScript are named beginning with the 3 digit shell number.
  • All sound objects are named beginning with the 3 digit shell number. (The ability to rename sound objects will become available in the near future)
  • All sound files are distributed in .ogg format and named beginning with "pahts", the 3 digit shell number, an underscore, and a name.
  • All nexus files start with "prin" instead of the shell number.


It's known already that all shells will need to be updated to work with the new plugin release, this seems more intuitive than the older method and should be easy to implement in existing files.

Anyone have any feedback?
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Naming Conventions (revisited)

Postby Robert The Rebuilder » Sun Jan 27, 2008 6:23 am

We can combine your suggestions with the existing guidelines, meaning that people can use either the sNNN or the NNN prefix. I already have used the sNNN prefix, as other people may have as well.

Since there currently is no convention for naming the sound files, your format sounds good.

But I'm not sure why you included the last line:

All nexus files start with "prin" instead of the shell number.


The nexus is incorporated into the whole city just like a shell, as is the hub.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Naming Conventions (revisited)

Postby Paradox » Sun Jan 27, 2008 12:23 pm

Robert The Rebuilder wrote:We can combine your suggestions with the existing guidelines, meaning that people can use either the sNNN or the NNN prefix. I already have used the sNNN prefix, as other people may have as well.

Since there currently is no convention for naming the sound files, your format sounds good.

But I'm not sure why you included the last line:

All nexus files start with "prin" instead of the shell number.


The nexus is incorporated into the whole city just like a shell, as is the hub.


So the nexus has a shell number assigned to it? :?
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Naming Conventions (revisited)

Postby Nadnerb » Sun Jan 27, 2008 1:47 pm

So the nexus has a shell number assigned to it? :?

Yeah, it's 3. The numbers are actually page numbers, not just shell numbers. Similarly, The Hub is 1, and the city streets are 0.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Naming Conventions (revisited)

Postby Aloys » Sun Jan 27, 2008 3:40 pm

Correct. In the future the city streets will be divided among several pages, when relevance regions will be available in the plugin. But that's irrelevant to the topic at hand. :shock:
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Naming Conventions (revisited)

Postby Robert The Rebuilder » Sun Jan 27, 2008 4:18 pm

Let me bring this back to the original point and merge together the suggestions. Here's the proposed modified naming conventions:

  • All geometry objects are named beginning with either sNNN or NNN, where NNN is your 3-digit shell/page number. For example, the name of an object in shell 111 would begin with s111 or 111.
  • All materials and meshes are named beginning with either sNNN or NNN.
  • All texture files are named beginning with either sNNN or NNN.
  • All colliders, regions, softvolumes, soundemitters, seekpoints, etc. are named beginning with either sNNN or NNN.
  • All objects are within the bounds of your shell walls. (The walls are on the layer 4 of your shell Blend file)
  • All Python script files are named beginning with sNNN, and all classes within the scripts are named beginning with sNNN.
    • If you have any global variables, declare them within a Python file named sNNNGlobals.py. This will put them in the sNNNGlobals namespace.
    • If your Python classes are subclasses of ptModifier, then set self.id equal to 189NNNX, where NNN is your shell number, and X is a number from 0 to 9 - this depends on how many ptModifier subclasses you have.
  • All objects defined using AlcScript are named beginning with the 3 digit shell number.
  • All sound objects are named beginning with the 3 digit shell number. (The ability to rename sound objects will become available in the near future)
  • All sound files are distributed in .ogg format and named beginning with "pahts", the 3 digit shell number, an underscore, and a name.


[Note: Python classes cannot start with a number; that's why they must have the sNNN prefix instead of NNN.]

How does this look?
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Naming Conventions (revisited)

Postby Paradox » Sun Jan 27, 2008 4:54 pm

Looks fine, but with that reasoning AlcScript objects and sound objects could also start with sNNN
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Naming Conventions (revisited)

Postby Robert The Rebuilder » Thu Feb 07, 2008 6:21 am

D'oh! One more time:

  • All geometry objects are named beginning with either sNNN or NNN, where NNN is your 3-digit shell/page number. For example, the name of an object in shell 111 would begin with s111 or 111.
  • All materials and meshes are named beginning with either sNNN or NNN.
  • All texture files are named beginning with either sNNN or NNN.
  • All colliders, regions, softvolumes, soundemitters, seekpoints, etc. are named beginning with either sNNN or NNN.
  • All objects are within the bounds of your shell walls. (The walls are on the layer 4 of your shell Blend file)
  • All Python script files are named beginning with sNNN, and all classes within the scripts are named beginning with sNNN.
    • If you have any global variables, declare them within a Python file named sNNNGlobals.py. This will put them in the sNNNGlobals namespace.
    • If your Python classes are subclasses of ptModifier, then set self.id equal to 189NNNX, where NNN is your shell number, and X is a number from 0 to 9 - this depends on how many ptModifier subclasses you have.
  • All objects defined using AlcScript are named beginning with either sNNN or NNN.
  • All sound objects are named beginning with either sNNN or NNN. (The ability to rename sound objects will become available in the near future)
  • All sound files are distributed in .ogg format and named beginning with "pahts", the 3 digit shell number, an underscore, and a name.


[EDIT] (7 Feb) Updated the checklist on the Ahra Pahts Wiki.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US


Return to Ahra Pahts

Who is online

Users browsing this forum: No registered users and 0 guests