• Welcome to SC4 Devotion Forum Archives.

Ped Mall Tiles and BSC Park Textures - trying to get my head around NAM concepts

Started by deadwoods, January 02, 2011, 10:02:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deadwoods

I'm looking at putting the BSC Park textures into the NAM ped mall tiles, somehow....

The key with the BSC Park path pieces (and parks) is that they use an interchangeable lot base texture and we supply a set of textures all using the same IID so whichever one you put in your plugins will appear in all BSC Park lots. I'm hoping there's someway we could achieve a similar outcome with the NAM Ped Mall Tiles (again, somehow...). I know some folks are playing around with getting just one of the BSC park textures. I'd like to get to the point of being able to offer the current set of textures in a single download.

I've been through the NetworkAddonMod5.dat and as many of the technical forums/tutorials I can find and have started on my understanding of how the supplied PMT's are implemented. Can someone validate my assumptions and help with the questions I have?

Assumption 1 - The Network Pieces are implemented similarly to a lot base texture and a set of props

Looking at all the PMT's in 5.dat, they have an exemplar of Type "0B" ("Highway") and some have an exemplar of Type "21". The exemplar each has refers to a set of model files (S3D) and associated FSH files. So this is, in poor mans terms, the "base texture" for the network tile, but implemented as a 3-d model rather than a flat texture. The Type 21 exemplar is only on a few of the PMT's and it refers to a prop being placed on some or all of the network tiles.

So if I wanted to implement a new set of BSC Park plazas in NAM PMT's, I'd need Type 0B exemplars for the BSC Park base texture(s) and Type 21 exemplars for the Maxis lightpole we use on most of the lots?

Assumption 2 - The NAM puts PMT's into the Highway exemplars/menu

Given the exemplars being used are Type 0B ("Highway"), the PMT's are implemented as separate hwy pieces?

Assumption 3 - You must use models not textures for the Highway pieces

The NetworkSPECS documentation says that two different GID's can be used for the Path files associated with a network; one for S3D files (i.e. 3-d models) and one for textures (0xA966883F vs. 0x69668828 resp.). Most of the PMT's are just basic texture-based lots but the path file has been implemented as 3-d models. I assume this is either because a) we're replacing hwy pieces that are 3d, or b) some of the pieces actually are 3d (i.e. go under hwy's).

Some questions...
3.1 - If I wanted to just create some plaza pieces that we're just based off a texture, could a path file use the texture GID?
3.2 - Could an existing Path file be cloned with the different GID, but containing the same path info?
3.3 - Does the IID of this Path file need to match the IID of the FSH for the texture (I can't see any other linkage)?
3.4 - If a texture-only definition were created, could it refer to an existing texture in another .dat (i.e. could I use the approach we've used for the normal path lots)
3.5 - If I have to create S3D files for each texture, is there any doco on this? Do I just BAT a 16x16 flat building using the texture? Or is there a better way to generate S3D files from textures?

Assumption 4 - Network pieces can share a single Path file

There are 24 Hwy exemplars in 5.dat, but only 19 SC4Path files. For example there's a Path file for 0x55267100 (the one with the pole) but not one for 0x55267200. So tiles can share.

Where is the association between a Path file and the Hwy exemplars that describe the network tile?

Assumption 5 - The "Effects Dir" file is required but the same for all PMT's

There seems to be an Effects Dir file for each of the PMT's, but they all appear the same. I'm assuming they're required but could be copied from an existing PMT for a new PMT? What are these files?

Assumption 6 - A new PMT using the Hwy Exemplar would automatically appear in the relevant menu item

I can't see anything tying the menu items to their place in the menu (such as occupant groups). I'm assuming this is somehow hardwired and as long as the new piece has it's exemplar's setup like the existing ones, it will automatically appear in the menu.

Assumption 7 - The 6th FSH/S3D File is for the initial plop only

We traditionally have five FSH files for the different zoom levels. The PMT's in 5.dat contain six, with the sixth often showing an arrow. I assume this sixth one, the same size as the fifth one, is just for the initial plop and goes away after the lot is plopped?

So....
If I were to create the appropriate set of files for a new set of PMT's, based on the info above, how should I implement/package/publish? Should I just hand them over to the NAM team for release in the next NAM? Or should I just pick a safe set of IID's and create a set of NAM-compatible files? Is there a registry of NAM IID's?
David, aka deadwoods

Tarkus

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
I've been through the NetworkAddonMod5.dat and as many of the technical forums/tutorials I can find and have started on my understanding of how the supplied PMT's are implemented. Can someone validate my assumptions and help with the questions I have?

Certainly! :)  I will have to go into some very transit-modding-specific technical details, however, to explain things.

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
Assumption 1 - The Network Pieces are implemented similarly to a lot base texture and a set of props

Looking at all the PMT's in 5.dat, they have an exemplar of Type "0B" ("Highway") and some have an exemplar of Type "21". The exemplar each has refers to a set of model files (S3D) and associated FSH files. So this is, in poor mans terms, the "base texture" for the network tile, but implemented as a 3-d model rather than a flat texture. The Type 21 exemplar is only on a few of the PMT's and it refers to a prop being placed on some or all of the network tiles.

So if I wanted to implement a new set of BSC Park plazas in NAM PMT's, I'd need Type 0B exemplars for the BSC Park base texture(s) and Type 21 exemplars for the Maxis lightpole we use on most of the lots?

That's basically it.  Puzzle pieces, by definition, have to be model-based, though the model can be flat in the case of the PedMall tiles, causing them to essentially look like a standard, texture-based network.  The exemplar doesn't actually reference the FSH files, however.  The exemplars only reference the models, and the models then have the textures applied/mapped onto them.  The texture-based networks do not require exemplars and are defined almost wholly by the RUL files.

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
Assumption 2 - The NAM puts PMT's into the Highway exemplars/menu

Given the exemplars being used are Type 0B ("Highway"), the PMT's are implemented as separate hwy pieces?

Yes, essentially.  Each piece has an entry in the IntersectionOrdering RUL File (the RUL file with IID 0x10000000, contained in NetworkAddonMod_Controller_RIGHT_HAND_DRIVE.dat and its LHD counterpart), which pulls together the exemplars for the piece.  Technically, the game sees the PedMall tiles as belonging to the Road network based on the CheckTypes section of the RUL entry--the "Highway" exemplars with GID 0xA8434037 basically just allow the exemplar to be read by that particular RUL file.  Type 0B exemplars are actually used for just about all types of model-based network content in the game, which the exception of Bridges and Tunnel Portals. 

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
Assumption 3 - You must use models not textures for the Highway pieces

The NetworkSPECS documentation says that two different GID's can be used for the Path files associated with a network; one for S3D files (i.e. 3-d models) and one for textures (0xA966883F vs. 0x69668828 resp.). Most of the PMT's are just basic texture-based lots but the path file has been implemented as 3-d models. I assume this is either because a) we're replacing hwy pieces that are 3d, or b) some of the pieces actually are 3d (i.e. go under hwy's).

Yes, all puzzle pieces must be model-based and use 0xA966883F as the GID on their path files.  Technically, they're not Lots, though . . . they're a separate class of transport network object that is technically known as an Interchange-base Related Item, or IRI.  The reason for the 3D basis is actually a requirement of the RUL file for puzzle pieces more than anything.

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
Some questions...
3.1 - If I wanted to just create some plaza pieces that we're just based off a texture, could a path file use the texture GID?
3.2 - Could an existing Path file be cloned with the different GID, but containing the same path info?
3.3 - Does the IID of this Path file need to match the IID of the FSH for the texture (I can't see any other linkage)?
3.4 - If a texture-only definition were created, could it refer to an existing texture in another .dat (i.e. could I use the approach we've used for the normal path lots)
3.5 - If I have to create S3D files for each texture, is there any doco on this? Do I just BAT a 16x16 flat building using the texture? Or is there a better way to generate S3D files from textures?

3.1: As they are puzzle pieces, and puzzle pieces have to be 3D models, they would have to use the GID for 3D models.
3.2: Path files can be cloned in the Reader, but they must have one of the two GIDs, which one being dependent on the type of item.  It is possible to take a path file with the GID for a texture-based item, change the GID in the Reader to that of a model-based item (or vice-versa) and have it work.
3.3: If it is a draggable, non-puzzle piece item, yes, and the path IID gets pulled from the RUL file.  The way puzzle pieces are defined, generally, the path's IID should match that of the exemplar for each tile.  There are ways to specify different IIDs on puzzle pieces, with some caveats.
3.4: Texture-only definitions can only exist for draggable items, generally.  For a puzzle piece, you'd need to have the texture applied to an S3D model.
3.5: The easiest way would be to simply grab one out of a NAM .dat file, change its IID and change the textures being applied to it.  It is possible to do it in the BAT, but it requires a special True3D script and it may not be optimized on the poly count.

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
Assumption 4 - Network pieces can share a single Path file

There are 24 Hwy exemplars in 5.dat, but only 19 SC4Path files. For example there's a Path file for 0x55267100 (the one with the pole) but not one for 0x55267200. So tiles can share.

Where is the association between a Path file and the Hwy exemplars that describe the network tile?

Most likely, the way the paths are being shared is through the use of an AutoPathBase line in the RUL 0x10000000 entry.  In basic terms, the game grabs the paths based on the exemplar IIDs unless there's an AutoPathBase line overriding it.

Quote from: deadwoods on January 02, 2011, 10:02:00 PM
Assumption 5 - The "Effects Dir" file is required but the same for all PMT's

There seems to be an Effects Dir file for each of the PMT's, but they all appear the same. I'm assuming they're required but could be copied from an existing PMT for a new PMT? What are these files?

The Effects Dir files reference the preview model that appears before you place a piece. It is linked in with the rest of the piece through its RUL file definition.  The RUL calls the Effects Dir by a text string, and the Effects Dir calls the preview model via its IID.  The main difference is the "resource_key" in Section 1 (which references the IID), and the "str" value in Section 13, which contains the string the RUL file pulls.  These two sections have to be edited in the Hex Editor view in the Reader as opposed to via the right window pane--my tutorial here covers that process.

Quote
Assumption 6 - A new PMT using the Hwy Exemplar would automatically appear in the relevant menu item

I can't see anything tying the menu items to their place in the menu (such as occupant groups). I'm assuming this is somehow hardwired and as long as the new piece has it's exemplar's setup like the existing ones, it will automatically appear in the menu.

The puzzle pieces do have an Icon Exemplar, which references the first piece in a TAB Ring as defined in RUL 0x10000000, and places it on one of the transport network menus.  The rest of the pieces are tied into the TAB Ring through the RUL file.

Quote
Assumption 7 - The 6th FSH/S3D File is for the initial plop only

We traditionally have five FSH files for the different zoom levels. The PMT's in 5.dat contain six, with the sixth often showing an arrow. I assume this sixth one, the same size as the fifth one, is just for the initial plop and goes away after the lot is plopped?

Yes, exactly.  :) It is applied to the preview model.

Quote
So....
If I were to create the appropriate set of files for a new set of PMT's, based on the info above, how should I implement/package/publish? Should I just hand them over to the NAM team for release in the next NAM? Or should I just pick a safe set of IID's and create a set of NAM-compatible files? Is there a registry of NAM IID's?

To ensure NAM compatibility, the RUL entries would need to be included in the NAM Controller file, which is distributed both through the NAM itself and the NAM Essentials package.  The actual packaging beyond that can vary.  Some smaller and more basic plugins get included in the NAM Core itself, while many others that are larger and have more options are released as separate-download NAM Plugins--e.g. the Network Widening Mod (NWM), Street Addon Mod (SAM), etc. 

Several NAMites--including myself--have been interested in the possibility of creating network items from the BSC path files for awhile now, so we'd be more than willing to help.  Awhile back, I even did a "trial" of a draggable implementation:



As that was a draggable implementation, it is texture-based.  However, from the looks of things, if it were fully model-based on everything, it may even be possible to implement an interchangeable overlay/base system with the network-based BSC paths, similar to the one that's been in place for the existing lots and textures.

IID-wise, we don't have an official registry, but we do have some guidelines behind most of our IID assignments, which has generally worked out over the years.  They usually tend to be project specific and dependent on the type of network and the nature of the items.  Most NAM items also tend to go in the 0x5######## range, as Tropod cleared that several years ago.  The only NAM item (aside from LHD pathing) that is outside that is the Canal Addon Mod, another BSC/NAM collaboration.  I may take a look at how the existing lots and textures are set up to help determine how best to implement everything on that end.

-Alex


wouanagaine

Maybe totally wrong, but as the S3D refers FSH by IID, if you want to provide variation, you need to :
- provide one new S3D for the BSC Ped mall referencing new IID for the FSH
- make everything needed to turn the S3D into a functionnal pedmall :)
- provide x sets of FSH using the same IID referenced in the S3D so user can choose the one matching his BSC Park texture

Hope I'm right :)

New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

deadwoods

Thanks guys, esp. Alex for the detailed responses. It makes a lot of sense now.

So to get BSC Park PMT's I'd suggest....

Short Term - The approach Andreas has been proposing in fourms when this comes up; I can create a set of FSH files with IID's that replace an existing one, and add the Maxis lightpole as a T21 to each file. If I create a separate .dat for each texture, the installer can allow the user to select the one they are using for the BSC parks. It needs to load after the 5.dat. I've got this working with one of the textures ("Brown Brick Large" replacing the Cobblestone one)...





This is a change I can implement without impacting the larger NAM and will do so shortly.

Medium Term - Get a new IID and corresponding Icon in the TAB Ring for a "BSC" Plaza, with the S3D/FSH files mapping to the default BSC Park texture. Then supply a set of override textures in separate .dats (like above) so users can select the one they use (with instructions on how to change later on). I'm happy to work with the NAM team on this to get it into the next, or next.1, release of the NAM. Assuming I get the first bit off the ground, a lot of it will be minor reworking of IID's.

Longer Term - get the draggable paths working. We'd certainly need to allow for overlays if we wanted to use the 1) narrow paths (like you've got there), 2) the wide paths, or 3) the tree avenue lots. Again I'm happy to work with the NAM team to get this happenning.

Cheers, David.
David, aka deadwoods

dahemac

Wow that is a thing of beauty! Am I looking at a BSC-Parks-textured pedmall chain connected to the road with transit enabled (pedestrian) BSC park lots?

deadwoods

Quote from: dahemac on January 03, 2011, 11:08:39 PM
Wow that is a thing of beauty! Am I looking at a BSC-Parks-textured pedmall chain connected to the road with transit enabled (pedestrian) BSC park lots?
Yes, yes you are  ;D
David, aka deadwoods

figui

Quote from: deadwoods on January 03, 2011, 11:45:42 PM
Quote from: dahemac on January 03, 2011, 11:08:39 PM
Wow that is a thing of beauty! Am I looking at a BSC-Parks-textured pedmall chain connected to the road with transit enabled (pedestrian) BSC park lots?
Yes, yes you are  ;D

&apls thanks.

mauricio.
first forums inhabitant from Uruguay..   first forums citizen from Uruguay..  first forums councilman from Uruguay..   first forums mayor from Uruguay..  first forums governor from Uruguay..
...i'm still the only one from Uruguay!

________