• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Another automata question

Started by Elric888, December 26, 2009, 10:33:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Elric888

Ok, here's the scoop. I have my Baja Bug almost done, but I have one last thing I cannot seem to figure out. I made a set of offroad lights, in addition to the standard head/tail lights, set that as an auxiliary model (just like the cop cars), wrote a vehicle definition file (works! Yay!), and added a key definition to turn on the lights. The problem I have is I do not know what to put in the line:

key_effects = {
     { cmd = drive_command.ALTERNATE, fx = "money_shower", hold = false },
   },

Where it says money_shower (copied from the limo), I need to know what to replace that with to turn on the lights (auxilliary model 2). Does anyone know where the definitions for the effects are? Or know what to put here, such as a way to load the model? Also if I use the same command as the cop car uses, will it also have a siren? (do not want this) I don't know if that is defined along with the flashing lights, or if that is based on the sound file for the car, if it's a product of the sound file it should be fine.
Any feedback would help.

RippleJet

Quote from: Elric888 on December 26, 2009, 10:33:50 PM
Where it says money_shower (copied from the limo), I need to know what to replace that with to turn on the lights (auxilliary model 2).

Only a few automata, e.g. the fishing boat when throwing and recovering the nets,
seem to use the key effect with cmd=drive_command.ALTERNATE for defining the Enter key in UDI missions.
And in those cases it does refer to an effect in the Effect Dir. E.g. "fishing" is effect number 796.

The police, ambulance and other vehicles don't include that definition in the LUA script, and the flashing lights are not effects in the Effect Dir.
I think the animated S3D file pointed to by Auxiliary Model 2 Key as such is attached to the Enter key in UDI missions...


Quote from: Elric888 on December 26, 2009, 10:33:50 PM
Does anyone know where the definitions for the effects are?

SimCity_1,dat, Effect Dir (TGI 0xEA5118B0, 0xEA5118B1, 0x00000001), Section 13.
The limo effect, "money_shower", is effect number 1021.
The index_key points to somewhere inside the exe, where the effect itself is coded though.


Quote from: Elric888 on December 26, 2009, 10:33:50 PM
Also if I use the same command as the cop car uses, will it also have a siren? (do not want this) I don't know if that is defined along with the flashing lights, or if that is based on the sound file for the car, if it's a product of the sound file it should be fine.

The Sound Bank ID property points to an AB file, which can contain sound and/or video.
Try removing this property and see which effects and sounds disappear.

Since the AB file format isn't decoded, we cannot edit them in any way though.

Elric888

Oh man..after looking through that directory I have a lot of new ideas for cars....I'm thinking of a James bond type of car....
Anyway that info was very helpful for future projects, Thanks Ripplejet!
QuoteThe police, ambulance and other vehicles don't include that definition in the LUA script, and the flashing lights are not effects in the Effect Dir.
I think the animated S3D file pointed to by Auxiliary Model 2 Key as such is attached to the Enter key in UDI missions...
That bugged me to no end..which is why I ended up asking here, it seems that most of the other special vehicles had their keys defined in the LUA's..I was afraid it was something like this. So if I just take the line back out of the LUA, it might actually just work when I hit the enter key? Believe it or not I hadn't thought to try this, but I'm going to now. (fingers crossed) I hope this works, because these cars would really be perfect if I can get the lights working  ;D ...although with my luck the vehicle probly needs to be defined as an emergency vehicle for this to work (class_id in the LUA)...
Well if nothing else, at least I now know where the effects names are, for experimenting with... &idea

Oh, I have another small question, I made a roofrack to go on these, set it up as auxilliary model 3, and used the property "autoload auxilliary model" with it set to 3, the same way the maxis semi trucks load their second half, and my roofracks never show up. This isn't a really huge deal, but I do kind of want them on it if anyone knows why this isn't working. I can't just paint them on the skin, since the skin stretches across the roof, besides which I want the racks to stand up off the car (I could just re-map the points otherwise)..I also tried just making a new set of verts in reader, but they never showed up (even after saving and re-loading), so I went with this method. Any thoughts on this?

Elric888

#3
Ok, I got it working!   ;D  So I thought I'd post my findings here, in case anyone else needs this information.

Setting the class_id to "0x6c1acde1" (emergency vehicle) in the LUA did the trick. I tried it first with the police vehicle class id, but couldn't drive it as my sim's car, so I tried this class, and BINGO. I didnt have any sirens, just my lights. Perfick (it seems the sirens are dependant on the sound bank used for the vehicle). I didn't need to add the key definition either, as Ripplejet said the class is defined already to do this...the only thing I did notice though, is that like other emergency vehicles, cars get outta 'da way when you're coming, but seeing as these are very bright lights, it doesn't look too unusual (besides which they're supposed to be used offroad..illegal in traffic ()stsfd()). Since the car has it's occupant groups set just like the cheap cars, it spawned normally too (I plopped a hospital just to check, no baja's spawned from it)

If I can figure out the roof rack I'll be set...Baja's coming soon...

thingfishs

great work elric, can't wait to see them :thumbsup: You should start a thread detailing your progress with all this. (or maybe you can have this one moved)
I wonder what the james bond car will do...

Elric888

Thanks..yeah, It's weird how fast this came together, I thought this vehicle would end up being further off..
QuoteYou should start a thread detailing your progress with all this.
That thought occurred to me shortly after posting this, but I still haven't figured out what's going on with the roof-rack not showing up, so maybe this still belongs here. I was thinking I might do a tutorial soon, detailing some of the stuff I've learned to do to automata (kind of pick up where the skinning tutorial by Mikeseith left off[I think thats who did it])
QuoteI wonder what the james bond car will do...
right now I'm thinking of: missiles (just like the tank/attack chopper), smokescreen (skywriting fx), and ejection seat (skydiver)... I'm going to try writing a new misson for the Baja Bugs (offroad rally race), if I get it to work I'll write a couple for the james bond car too. I'm just not sure if the script will execute or not..I'm still sifting through all the mission LUA's deciding how I want to do it. Incidentally if anyone has info on this, I need it (I assume that since it is a user made script it will at least need a package ID to execute)

Anyway, I gotta finish up all the exemplars for the re-skinned bajas, then write and test the mission, hopefully in about two or three days they will be done, and up on the STEX..maybe later today I will start a new showcase thread for my stuff so you can get a sneak-peak of the lights and such.

I still need aid with the roofracks if anyone knows anything.

RippleJet

Quote from: Elric888 on December 27, 2009, 03:05:58 PM
Oh, I have another small question, I made a roofrack to go on these, set it up as auxilliary model 3, and used the property "autoload auxilliary model" with it set to 3, the same way the maxis semi trucks load their second half, and my roofracks never show up. This isn't a really huge deal, but I do kind of want them on it if anyone knows why this isn't working. I can't just paint them on the skin, since the skin stretches across the roof, besides which I want the racks to stand up off the car (I could just re-map the points otherwise)..I also tried just making a new set of verts in reader, but they never showed up (even after saving and re-loading), so I went with this method. Any thoughts on this?

I suppose the roof rack is offset to appear at the correct height, and not at ground level, disappearing inside the "baja bug".
I also suppose you do have a tight LOD box on your baja bug, so that the roof rack doesn't end up being inside it.
Otherwise I'm afraid I can't help you any further... the six semis are the only vehicles using the Auxiliary model 3.


Quote from: Elric888 on December 28, 2009, 02:55:19 PM
(I assume that since it is a user made script it will at least need a package ID to execute)

Yes, just make sure that the package ID number isn't negative (anything smaller than 0x7FFFFFFF will do).


Quote from: Elric888 on December 27, 2009, 03:05:58 PM
Anyway, I gotta finish up all the exemplars for the re-skinned bajas, then write and test the mission, hopefully in about two or three days they will be done, and up on the STEX..maybe later today I will start a new showcase thread for my stuff so you can get a sneak-peak of the lights and such.

You should open up a candidacy for the LEX as well! :)

Elric888

QuoteI also suppose you do have a tight LOD box on your baja bug, so that the roof rack doesn't end up being inside it.
I hadn't considered that one...It's the original maxis model, modified some (in reader) so I have no idea how tight the LOD actually is on the original (I still havn't messed with GMAX too much). I set the height for the roofrack just a bit higher than the roof on the car, so that could very well be the problem. I'll try raising it a bit higher and see if it shows up. Thanks Ripplejet!  :thumbsup:
Of course if that is the problem, and I get it to show up without sitting at a ridiculous height I'll have to re-do all the menu icons I did last night  &mmm...my least favorite part of automata making (it's kinda tedious) oh well, better to have it the way I want it..
QuoteYou should open up a candidacy for the LEX as well!
I may just do that, although I'll have to look at the guidelines again..it seems there was something in there that made me decide not to bother trying for LEX candidacy before..also i don't know HTML so I'm not sure how to make the read-me file (I do remember that was one of the factors), but I will look again  ;D

thingfishs

I don't know how it's done yet, but I'm pretty sure there's an automatic read me maker. You don't need to know HTML, otherwise I'm stuffed too.