• Welcome to SC4 Devotion Forum Archives.

Effects

Started by Lowkee33, May 08, 2012, 04:09:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lowkee33

I've been working on editing and creating new Effects.  Things are pretty copy/paste right now, but as I learn more perhaps the effects can get more complicated (attractors/repulsors).

This is a test of how the SimCity EffectDir can be overridden.  I've made the Robot's smoke purple by editing the color levels of the smoke effect (from within the directory, not editing FSH).  What makes this interesting is that I copy/pasted the smoke effect out of SimCity_1.dat and then gave it a new instance.  Meaning, we can make mods on SimCity effects without needing to copy/paste the whole thing.



I copy/pasted the rain effect, changed the FSH it points to and some other parameters, and snow is created.  The effect is put on a lot:  (This picture seems to be having troubles)


Here's a video that NCGAIO made for me: YouTube

I've also been making mayor-mode-plop-effects.  This was done by copy/pasting the pigeon effect, then adding a Section14 with a new Group/Instance.  A quick copy/paste of the horse brush exemplar, and there we go.  The pigeons are 16 meters off the ground, higher than the house you see on the right, but lower that the hawk effect.



For the menu, I've added the Fauna tool to the mayor menu, and switched the image with that fancy one.

They are all pretty beta right now.  Snow is pretty heavy on the computer processing.  By increasing the duration of the pigeon effect, it makes them much more likely to flock together (turn at the same time).  However, this also means they will fly pretty far away from where one plopped them.

Tarkus

This is pretty neat stuff!  Effects have traditionally been an area that hasn't been terribly well explored, so this is definitely going to be a leap forward.  I'll have to keep a close eye on your efforts. :thumbsup:

-Alex

mike3775

Wow that is impressive work Lowkee

xannepan

Fantastic! I have been looking into this some time ago myself, but decided to stick to creating buildings, bridges and minor modding... Glad you picked this up!

&apls &apls


Kergelen

This is really interesting mooding! The snow is impressive :)


                                    Links to SC4 websites

catty

Quote from: Lowkee33 on May 08, 2012, 04:09:43 PM
...I copy/pasted the rain effect, changed the FSH it points to and some other parameters, and snow is created.  The effect is put on a lot:

Its not very visible in these pictures (look for white specks) as I didn't want to crash my computer having too many of the snow lots, I also added a snow mod to the city


MAY120003 by SC4D_CATTY, on Flickr


MAY120006 by SC4D_CATTY, on Flickr

it looks   ()stsfd()  and I find myself just watching the snow falling   ;D
I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.

Girafe

I have to admit that better weather animations like you showed us could be awesome additions to the game.

Glad you are digging this domain  :)
The Floraler

This is the end, hold your breath and count to ten, feel the earth move, and then...

*   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *    *   *   *   *   *    * 

Lowkee33

#7
Thanks Alex.  I've got some NAM-esque mods in the brain factory.  I've got to study some Swampper works to really get into it though.

Hi Catty, thanks for the pics (seems like mine is broken?).  Yeah, the snow is horrible for the computer, each snowflake being another position to calculate.  But I do think it looks like a realistic snow flurry, anything I do will compromise that.  However, I did make that snow a while ago and have better methods.  To my defence, NCGAIO's video is a little choppy (look at the way the mouse moves).

I'm considering the Pigeons done, now just making the packaging.  Look like pigeons, sound like pigeons (except when plopped).  I know how to change the sound, I just don't know what the sound will be until I enter the game (effects point to TRKs that point to LEVs).  Pigeons plopped in this method will never go away, but they don't survive the save game.  They don't work as props, but neither do the other "herds" and there is already a pigeon prop that Maxis made for us.

NCGAIO

#8
http://www.youtube.com/v/8RyAj2iBYQw

The video was recorded on the computer that was available at that time (on-board graphics) but it is an indication of what occurs in small machines. (That's why Maxis did not rain in SC.)

Taking advantage of this posting  I comment the other matter.

The movement of automata that run along the path is not controlled by EffectDir

They travel routes (Eg: Road. Rail ...) by means of instruction placed on Lua Script that generate them, as in the example below.

(Creation of automata in Simgoober Channel)
Quote
Lua Script:
automata_group.canalferry =
{
    _parent = automata_group.monorail,
    group_id = "0xCA1A1000"
    class_id = "0x4c22ae53"
    source_building = "0xCA1A100A"
    csi_image = "0xca1a1000"
}

generator.canalferry_generator =
{
automata = {"canalferry"},
    count = 1,
rate = 1,
rate_scale = RateScale.PER_WEEK,
max_count = 1,
        ground_only = true,
use_lot_facing = true,
radius = {1, 5},
follow_rail = true,
follow_road = true,
}


In the same way that  Swampper, Mikeseth etc. .. also created new scripts to introduce new automata in the game

For those who travel randomly across the screen are controlled by EffectDir as those who are called by Prop Effect such as Effect_seaport_forklit; Effect_WillioBimpio; Effect_HotAirBallonFlight: etc. ..

Or the special generators as Tag 1x1x3_Ruway - Airplane;
  Tag 1x1x3_Helicopter_2B6000 - Helicopter;
  Tag 1x1x3_SeaportSpawnPoint - Ships ... etc..

Quote
All can see them on screen with the cheat "Effect" ( Crlt-X )

Synthase: effect <nome_effect>!


Mr_Maison

Very interesting. Thanks for the link to this disscussion Lowkee. I'm new at Ilives reader. I'm in the proccess of learning how to navigate. How do you find the animals that appear in God mode? I'm looking for the buzzard so I can change the texture. As you know from my thread on ST I am very interested in making custom wildlife if we find it's possible. It makes sense for me to start with something simple like changing textures of existing models before I dive into completely new creations.

Lowkee33

@NCGAIO:  I'm interested in increasing the amount of time that automata are displayed (perhaps they actually go somewhere).  It may also be possible that an effect could do something like raise a tile by 15 meters.

@Mr_Maison:  It is pretty tough to go from effect to FSH.  Open the EffectDir and go to Section13.  Select the columns and copy/paste them into excel.  The use excel to find the word "buzzard".  You will find four of them, but one named "Buzzards".  Note the IndexKey of Buzzards (which is 262).  This is hexadeciamal, but you need to know it in decimal (610).  Then go to Section12 and click the "show list" check box.  Find Entry 610 in Section12, and see that there are 3 Primary Index Flags.  Chances are, they will point to the same model eventually.  The Flags point to section01, and the key is the entry in section01.  So then, go to Section01, show the list, and find entry 725.  One of those columns is "Resource Key" and the value happens to be 0xca0e264f.  That is the instance of an S3D, which is your buzzard model.  Click on the MAT tab, and note the instance of the FSH (4a0e2626).  The FSh is found in SimCity_2.dat.  However, this seems to be a special FSH that I can't edit, so there you go :).

gn_leugim

This is wonderful  :o :o great progress :thumbsup: :thumbsup:

Tarkus

#12
All the attempts I'm aware of that increase automata visibility time rely on the Automata Simulator (e.g. Vehicle Lifespan Range).  The unit given is "cells", which I would presume to equate to tiles.  0xFF for both values should theoretically keep them from disappearing (Blue Lightning's Radical Plugin does change the second number to 0xFF).  That covers a full large city tile straight across--if they took a more circuitous route from one end to the other, they could still disappear. 

I'm guessing you're going to try to play with the actual disappearance effect on the EffDir end?

-Alex

Lowkee33

Quote from: Tarkus on May 09, 2012, 01:17:56 PM
All the attempts I'm aware of that increase automata visibility time rely on the Automata Simulator (e.g. Vehicle Lifespan Range).  The unit given is "cells", which I would presume to equate to tiles.  0xFF for both values should theoretically keep them from disappearing (Blue Lightning's Radical Plugin does change the second number to 0xFF).  That covers a full large city tile straight across--if they took a more circuitous route from one end to the other, they could still disappear. 

I'm guessing you're going to try to play with the actual disappearance effect on the EffDir end?

-Alex

Well, not anymore :)  I think I confused myself as to what radical meant.

NCGAIO

#14
Quote from: Lowkee33 on May 09, 2012, 01:06:42 PM
I'm interested in increasing the amount of time that automata are displayed...

Following the response from Alex note that models of automata have in your animation something like 100 frames, while all have the same vertices. To offset the Effect may not be possible to overcome this sampling, without introducing further frames ...

Quote from: Lowkee33 on May 09, 2012, 01:06:42 PM
@Mr_Maison:  I...  However, this seems to be a special FSH that I can't edit, so there you go :).

If I am not mistaken is a mipmap texture ... search on Null45 Tools ..

Quote
You surely already know .. but if anyone else is interested here is the link to the structure of EffDir although still incomplete behind him important information such as the definition of sections, etc ...

FILE STRUCTURE EFFDIR

null45

#15
Quote from: NCGAIO on May 09, 2012, 02:32:20 PM
If I am not mistaken is a mipmap texture ... search on Null45 Tools ..

You are correct that file uses embedded mipmaps (as do most automata), they can be loaded but currently only my Paint.NET FSH plugin supports saving them.

I will probably add the ability to save embedded mipmaps in the next version of my other tools.

The Reader scrambles most images with embedded mipmaps because it loads the mipmaps over the main image.
Those images load fine when a one line fix to the Reader's fsh handling code tells it to ignore all embedded mipmaps.  :thumbsup:




NCGAIO

#16
Quote from: null45 on May 09, 2012, 03:56:11 PM

I will probably add the ability to save embedded mipmaps in the next version of my other tools.


Very good to know ... until they come, one could also directly use the FSHed or EAgrafh EA tools  for editing. Both can be found in below links

FSHed - Vs 0.0.5

EA Graphics Editor - Vs 1.0.4b

Lowkee33

Thanks Null45, maybe I'll have to fix that line.  For the example I posted, Multi-FSH saved it as a .fsh.png, which I opened in GIMP.  Then I edited the png and then deleted the .png extention.  Reader crashed upon load, is this the same reason, or did I really mess up the FSH?

The Effect Structure link was very helpful for me.  There are a couple places that I'm not sure are correct, and a few others where Reader would disagree (output to screen wise).  I would have to check the code I wrote to know exactly where.  There is also a DWORD described as a rep, but that rep is always zero in SimCity Dat.  Don't think I'm going to argue though.

Quote from: Lowkee33 on May 09, 2012, 01:24:34 PM
Well, not anymore

Maybe not, thinking about SC4 after class is a pass-time I have.

Quote
Lua Script:
automata_group.canalferry =
{
    _parent = automata_group.monorail,
    group_id = "0xCA1A1000"
    class_id = "0x4c22ae53"
    source_building = "0xCA1A100A"
    csi_image = "0xca1a1000"
}

group_id and class_id are interesting there, it is possible that those are values in Section 14 (in which case they are arbitrary).  Maybe class_id points to Section15, which I'm not too sure about.

We also have a _parent of automata_group.monorail.  Moving to the parent, it's parent is automata_group.train.  From there we move right to automata_group.vehicle (off the top of my head, no reader here).  Vehicle has a "final group" (or something like it) of 0x4002.  0x4002 appears a lot in the EffectDir, in Section01 variable U1.  Every puzzle-piece preview has a U1 of 0x4002, as well as various other automata related effects.

The U1 variable seems to create a category of effect, all effects with identical U1s are similar in nature.

Quote
For those who travel randomly across the screen are controlled by EffectDir as those who are called by Prop Effect such as Effect_seaport_forklit; Effect_WillioBimpio; Effect_HotAirBallonFlight: etc. ..

Or the special generators as Tag 1x1x3_Ruway - Airplane;
  Tag 1x1x3_Helicopter_2B6000 - Helicopter;
  Tag 1x1x3_SeaportSpawnPoint - Ships ... etc..

I'll have to look at these in detail.  Perhaps if I can get a link between an LUA and the EffectDir then something interesting might pop up.

null45

Quote from: Lowkee33 on May 09, 2012, 04:56:14 PM
Thanks Null45, maybe I'll have to fix that line.  For the example I posted, Multi-FSH saved it as a .fsh.png, which I opened in GIMP.  Then I edited the png and then deleted the .png extention.  Reader crashed upon load, is this the same reason, or did I really mess up the FSH?

No, the Reader is crashing because it tries to read a PNG file as a FSH, I might change that so it does not use a double extension (e.g. _fsh.png) which should prevent confusion in the future.

The line of code to fix is line 503 in fshtool.cpp changing:l=numscales; to l=0;

NCGAIO

#19
Quote from: Lowkee33 on May 09, 2012, 04:56:14 PM
The Effect Structure link was very helpful for me. ...

Thanks for the thanks .. !!   :(

Quote from: Lowkee33 on May 09, 2012, 04:56:14 PM
Perhaps if I can get a link between an LUA and the EffectDir then something interesting might pop up.

Section #6