Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat
Welcome to SimCity 4 Devotion. Please login or sign up.

August 13, 2022, 02:29:16 PM

Login with username, password and session length

Downloads

Making Lots with Boats that Float on Water

Started by sam, September 22, 2007, 01:37:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sam

Making Lots that Float on Water

This tutorial was written in response to a question on the forums.

The objective of this tutorial is to make a lot with a boat that floats on water.

For this tutorial I am going to borrow Jeronij's JRJ Ships Toyama (Red), found here: http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=42 (they still have the XML file which makes things easier).

You will need:

  • A suitable model with XML still in the .sc4model or .dat file
  • The Plugin Manager
  • The Lot Editor
  • Ilives Reader is optional
  • SimCity4

Short version for experienced custom content creators:

Your boat must be a building, not a prop. A park building is preferable as it does not require road access

1.   Make a park building descriptor file for your boat model using Plugin Manager
2.   Make a park lot for your boat based on the Maxis green grass park
     a.   Add your boat building to the lot
     b.   Put a water constraint anywhere on the lot
     c.   Set the Foundation Threshold to 90, the Elevation Change Lot Max to 90 and the Elevation Change Lot Min to 0
     d.   Save
3.   Make your base textures invisible if you wish using Ilive's Reader
4.    In the Reader, set the Building Foundation to 0x194B1000 (the invisible foundation)
4.   Test your new lot



Detailed Version


Part 1 – Setting Up and Making the Descriptor File

1.   Remove all unnecessary plugins from both plugins folders
2.   Put the model files you want into your root plugins folder (C:\...My Documents\SimCity 4\Plugins)



3.   Open the Plugin Manager. Make sure you can see the tree structure on the left and make sure Models is selected. This should show you the models you can use.



4.   In the tree on the left, make sure the Park option is visible. In the right pane, select the model you want to use. Drag and drop it over the Park option on the left. This should create a new building exemplar of the type park, based on your model.



5.   Give it a good Exemplar name Item name and Item description. Ensure Power is set to 0, and change any other properties that need changing.

6.   Click OK at the bottom of the screen to save your changes. You should get a message saying Plugin saved successfully. Click ok to that to, and you should be returned to the PIM, but now you will not be in the models section, you should see the parks section with your newly created exemplar (sc4desc file) showing in the right pane. Using Windows Explorer you should also see a new .sc4desc file in your Plugins folder.



7.   You can close the Plugin Manager now.


Part 2 – Making the Lot

8.   Open the Lot Editor

9.   Open the Maxis grass lot (this is why it is important you have removed all unnecessary custom content)



10.   Resize your lot so that you can fit your boat on it. I had to make mine 3 deep and 17 long to fit Jeronij's cargo boat.

11.   Go to the building tab and click Replace Item. Choose your new boat from the options in the list (if you don't see it, your lot is too small, the wrong type or you used the wrong descriptor type in the PIM).



12.   Position your boat as desired, and so it is not overhanging the lot.

13.   Delete the existing base texture and add the Maxis sand texture (261f0000) or custom base texture of your choice to all tiles on the lot (even if you are going to make it invisible later there must be a base texture for all tiles – be sure to note the iid of the texture you use).

14.   Go back to the Lot tab. Set the Foundation Threshold to 90, the Elevation Change Lot Max to 90 and the Elevation Change Lot Min to 0 (see red arrows on image)



15.   Go to the Water tab, and add a water constraint tile anywhere on the lot. You only need one tile, but this tile will have to be placed under water in the game (so middle is probably good)



16.   Don't put any other props on the lot (you can if you want, but they will sink to the sea floor. So maybe some rocks and seaweed might be nice)

17.   Click Save As and give your lot a good name (include the size, type and what it is). Click OK to save the lot

18.   You should now have a new .sc4lot in your plugins folder




Making the Base Textures Invisible (Optional)

19.   You can make your base textures invisible at this point if you like.

     a.   To do this, first back up your lot, then open it in Ilive's Reader and select the Lot Exemplar in the middle pane.
     b.   Check the iid of the base textures you noted down earlier.
     c.   Find all the LotConfigPropertyLotObjectData properties in the right pane where the last rep is this iid and the first rep is 0x00000002. There should be the same number as tiles on your lot (if not, something is wrong)
     d.   Select them all, right click and delete those lines
     e.   In the right pane, right click again and select ReIndex LotConfig
     f.   Save your file.



20.   Do any other modding necessary, eg change plop costs etc

Testing
21.   Test your lot in game. It should appear in the Parks menu. Check the boat floats and the textures are invisible. Check you don't get any no power or no road zots etc




Edit: Getting Rid of the Building Foundation
One tweak I forgot to mention, which you will need if you ever want to use your boats on half land half water, is to add the invisible building foundation. Otherwise when the boats are placed on half land half water, you will get  a building foundation showing (it doesn't occur when the lot is completely in the water).

To do this, just open the lot in the Reader, and in the middle pane, choose the building exemplar. Then in the right pane, check to see if the building foundation property is present. If not add it (right click, add property). Then, to make the foundation invisible, make sure the first rep is set to 0x194B1000 (not 0x00000000 as that will default to the red brick)



Appendix 1: Occupant Groups (Optional)
Callagrafx and RippleJet mentioned Occupant Groups. Among other uses, Occupant Groups control which menu a lot's icon appears in. If you want to move your boat to the water transit menu, here's how:
1. Open the lot in the Reader
2. In the middle pane, select the building exemplar
3. In the right pane, look for the occupant groups property. Currently mine says Building, Civic; Building Park (or in hex 0x00001005,0x00001006) ie it appears in the Parks menu (see above picture, blue arrow)
4, To edit the property double click on it. You will get a pop-up box like below:



5. There should be two white boxes under values. Remove the second one (click on it, then click Remove)
6. Change the first one to 0x00001519 (the occupant group for water transit)
7. Click the upper Apply button, then the lower Apply button.



8. Then save your lot and test it.



callagrafx

Great tutorial Sam...

Could you go a little further and change the occupant group and menu position to fit into the seaports menu?  I'm sure it can be done but not sure of what the OGs are.
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it


sam

Thanks Cal :)

I haven't done that modification for this particular kind of lot before, but I'm sure it could be done. I would just need to get the OGs from another seaport lot. I would like to test it before I make those additions to the tutorial though (I tend to leave the boat lots in parks to keep the seaports menu clutter free, my parks menu is a lost cause on the clutter front though).

I also tend to make them neutral which I didn't do for this one.

Another refinement that would be useful would be a Menu Management Lot as the downside of this technique is that you can't use building families for ploppable lots.

RippleJet

Quote from: sam on September 22, 2007, 01:52:13 AM
I haven't done that modification for this particular kind of lot before, but I'm sure it could be done. I would just need to get the OGs from another seaport lot.

0x1519 (Water Transit - Menu Placement), taken from this thread: Occupant Groups and Occupant Types

jmdude1

#5
this is an awesome tutorial sam, very detailed and straight forward, thanks so much!  im sure people will have a lot of fun making their water come alive now.

edit: for those of you trying to use .dat files without an xml file check out this thread: http://sc4devotion.com/forums/index.php?topic=1791.0
it worked for me using pegs scows, although the reader did freeze on me once. also, i used sam's park method instead of the LM method.

Yoman

I really could not thank you more for this tutorial, Xiziz and I can now go ahead and lot our Soviet Submarines as lots instead of an overhanging prop on a land lot, thank you very much :)

Xiziz

As yoman said, were both grateful of this tutorial :P

Though i was wondering, is it possible to have the boat(submarine in my case) as a prop instead of a building? this way one could have a 1x1 lot, reducing the change for any buggs to be visible :P

jmdude1

xiziz, if you add props to a water tile, the ground or base texture will always show. check out this thread: http://sc4devotion.com/forums/index.php?topic=2434.0
luckily for me sam made this great tutorial. good luck with the subs.

callagrafx

Thanks for the Addendum Sam, this is a great tutorial and it's going in the file marked "bllody useful help"
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it

sam

Glad to be of help. Thanks for all the comments.

Btw its useful for more than just boats.

sithlrd98

Thank you sooooooooo much for this...I've been struggling with some models I got from some japanese sites for hours and , well thank you!


FrankU

Sam,thanks for the tutorial. You just answered a question I put in another thread.
It's maybe not too much work, but if I use a lot of ships, it still takes some effort....
I had the same struggle with these japanese files.

And I have an answer: to place the ships into the seaport menu, the easiest way is to open the file in LE prop. Then open the menu for menu placement (it's the lowest blue square on the right, with the triangle). Click on advanced, delete all the occupant groups you see there, and add the occupant group "building: water transit" Voilà.