dertyjerzian Posted August 29, 2005 Share Posted August 29, 2005 0247: request_model #BULLET:MAIN_390001: wait 0 ms00D6: if 00248: model #BULLET available004D: jump_if_false ££MAIN_3900A5: $4 = create_car #BULLET at $7 $6 $5036A: put_actor $PLAYER_ACTOR in_car $4016A: fade 1 (back) 1000 ms0001: wait 100 ms03E6: remove_text_box Somewhere in the above code there must be a place to add carcols info to. I'd like to turn my BULLET pink with black or brown stripes, could someone here help me? The opcode database only turned up results for a car generated, this is not what I need in this case I bet that generator will be for parked cars right? Well, how do you paint the above car in the code? Thanks everyone Link to comment Share on other sites More sharing options...
Demarest Posted August 29, 2005 Share Posted August 29, 2005 First things first: You should be using custom labels and custom vars. Locals are best, but if you must use globals, do NOT use DMA. In SAMB, DMA is vars stored as $number. You're very naughty though. Searching the opcode database reveals 0229 change car color. Searching for this opcode in original code, it's almost always used after create_car. Hope that answers your question Link to comment Share on other sites More sharing options...
dertyjerzian Posted August 29, 2005 Author Share Posted August 29, 2005 (edited) EDIT: I found it after you told me the opcode, but it only has the name of it here No other useful info is there But good to have learned it will go after the create car stuff. I'm going to look uin the script now for that code It totally does dude Wow, which DB are you using?!? Is it the yellow one with a search in the upper right? Cause seriously, all I found there was parked_car_generator! Demarest, before answering you advised aboput my variables and labels. I have to confess that I didn't write the above, Steve-M did, I just changed the hydra and how high I spawn, maybe you cvould explain it to me better? I just really do want to understand, and this might sound cheesy buyt I don't want to miss any lesson you share. Edited August 29, 2005 by dertyjerzian Link to comment Share on other sites More sharing options...
Demarest Posted August 29, 2005 Share Posted August 29, 2005 Well when you decompile something EVERYTHING is assigned labels by the MB. If this is the case with any code you post, you can disregard what I said about custom names because that only applies to code YOU write. All I mean (since you asked for an explanation) is that when you're writing your own code, you should use your own labels. When I write code for others, I use :mymod, :mymod2, etc. As for variables, the need to use locals over globals becomes clearer to me all the time. The Builder's readme should give you a good idea as to the differences. For the sake of answer your question (also covered in the readme), to give a global variable a custom name, you use $ to indicate it's a global variable and then you can make it any name you want so long as it doesn't start with a number (in SAMB). In sample code, I would use things like $myvar $playerX and the like. Normally, I use the VC database because it loads faster. The SA is only useful for the SA specific opcodes and a) most of them are unkown or not filled in and b) most of the known ones are identified in my own code and it's just faster to search the original code for examples. I don't ever use the database's search feature. I go to its display all page and then use the browser to search the page. In firefox, it's nice because I can just type what I'm looking for. I'm not sure how you arrive at parked_car_generator searching for "color", but it works by specifying the carcols.dat color number. Link to comment Share on other sites More sharing options...
dertyjerzian Posted August 30, 2005 Author Share Posted August 30, 2005 (edited) Yep, I figured it out when I found it in the main Just tested for myself and what do you know? My #BULLET is pink with a brown stripe Now to find some code that will start me with hydros as well so I can bounce my ish'll!! Yea that is all in the readme, roughly just as, as well. But you explaining it a second time after the readme helped to put more in perspective so you do totally rock for that Dem, thank you. Sometimes, and coding is one of those instances, some things just need to be said twice, I guess. I'm glad you were here to guide me. A look at what I have now (I pretty much haven't found much more to do yet, what with my low-level of knowledge. Still looking though): :MAIN_390001: wait 0 ms00D6: if 00248: model #BULLET available004D: jump_if_false ££MAIN_3900A5: $4 = create_car #BULLET at $7 $6 $502AC: set_car $4 immunities 1 1 1 1 10229: set_car $4 color_to 126 40036A: put_actor $PLAYER_ACTOR in_car $4016A: fade 1 (back) 1000 ms I also know how to set the radio station, but I think you cannot make it start as the User Track Player, which REALLY sucks. Eh, soon enough we'll be able to change that music in stripped installations hopefully, and I will use one of those slots for the intro... Anyone familiar with changing the radio station know what number to use for user track player? Like I said, I think it's probably never done in the SCM, though the normal game stations are all through the scm assigned to cars. Station 3 comes up a lot. WTCR I think, I know 11 is off (but might mean higher than 9 or 10 is off) and 9 or 10 was master sounds... Got tired and stopped before I could remember their ID's. PS: I think unknown integer in Set Car Immunities is anti-cj-gets-carjacked or anti-seen-by-cops. Carjack seems more likely since there is alread a lot of stuff about ignored by cops. Edited August 30, 2005 by dertyjerzian Link to comment Share on other sites More sharing options...
Demarest Posted August 30, 2005 Share Posted August 30, 2005 Sometimes, and coding is one of those instances, some things just need to be said twice, I guess. I'm glad you were here to guide me.Oh I totally agree. That's why you shouldn't be embarrassed that it was covered there. I urge even seasoned coders to re-read it every now and then. I know every time I've picked it up, I was taught or reminded of something. May I assume the code you posted is decompiled at not your own? Also, I hope you're right about the unknown immunity. It's in each game. As for me, I will NEVER touch radio stations in SA. In GTA3 and VC it was easy. You had stations and you had a pair of radio announcer overrides and that was the end of it. In SA, the stations are evolutionary. They make comments on day/night, REAL weather reports, and make references to some of the things you've been up to. I think that last part is triggered by a lot of high-numeral stat settings in the mission passed sections. Link to comment Share on other sites More sharing options...
dertyjerzian Posted August 30, 2005 Author Share Posted August 30, 2005 Well, if it becomes managable to just play a custom track in all the native radio slots, I'll be happy I'm hoping to do an unnoficial soundtrack for CNG I was thinking I'd record an hour or so from each of the local stations here worth listening to, about five, and contributors of other locals for the various expansions could do the same. Could be updated regularly. I figured they were intricate in SA when I first heard them mention something I had just done on WTCR. I was amazed for sure. Especially as it continued reporting the events as I did them, and of course the weather reports. The code is a mix of stuff I copied and pasted from the original decompiled SCM along with some edit's made to what I was pasting to, what was Steve-M's stripped SCM supplied with his Map Cleaner.#HYDRA to #BULLET and Z axis 30.0 to 14 so my car didn't flip at game start haha. Yea, and the unknown immunity, I just can't think of any other threats against vehicle transportation around the games other than the wanted level or the carjacking. Carjacking is rare as hell after you get the hang of the game, so it'd be easy to not notice it anymore when thinking about that command, and how many people actually think about that one value in that one command you know? I'm staying with car jacking, but steve-m will probably get to call me a n00b again, if I'm wrong lol. The readme for BWMB is hefty, I haven;t made it all the way through, I would cripple myself if I rushed, but I assure you, I'm dedicated to doing this right Link to comment Share on other sites More sharing options...
Demarest Posted August 30, 2005 Share Posted August 30, 2005 Well, if it becomes managable to just play a custom track in all the native radio slots, I'll be happy Well then, you picked the wrong game to mod for. GTA3 had 2 total (one totally free to use) and VC has 2 radio overrides. I don't think SA has any because they bothered to sew such stuff into each channel. Also, I've encountered checksum issues where the game seems to recognize that an audio file was tampered with and assumes it to be corrupt and asks for the game disc to grab it again. Not sure if that's true of SA or if that will even effect you. Just letting you know about it. In GTA3 or VC (possibly SA), you could use zone commands in conjunction with external ped files to spawn nothing but the carjacker types, set a car with just the unknown flag, and see if anybody approaches you. Would be worth it to break 3 year old ground methinks Link to comment Share on other sites More sharing options...
dertyjerzian Posted August 30, 2005 Author Share Posted August 30, 2005 Yea? I'll have to look into that. Gotta figure the peds out soon anyway. Dude, my head hurts! I've been getting so much done. Code is still the same, but I'm pumping models out back to back. That's mainly because I'm half-assed texturing them to return to them at a later date. I need something other than roads to drive on I know you loved GTA3, so you're going to Flip for this map. Erm... rather, Flips. hehe. I guess the radio will just have to be the same. Oh well. I'll make custom user track stations Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now