nubbel Posted June 27, 2005 Share Posted June 27, 2005 (edited) Hi there, I had an idea for a mod but wasn't able to realize it because I'm very new to modding. My idea was to let you save cars in the 3 garages at Mad Doggs mansion. I know you'll have to change the main.scm, but thats nearly all I know. I tried this: http://www.gtaforums.com/index.php?showtopic=199284 what let me at least teleport this Chop Shop to one of Mad Doggs garages (1254.869 -805.3426 84.14063) But I'm not really able to work with this sort of code I guess the task isn't that difficult, but without any knowledge/help in this case I can't go any further. Could anybody please help me? Thanks and greats! ------------------------------ [EDIT] The final result of my tries can be found here: http://www.gtaforums.com/index.php?showtop...20#entry3237573 Again, thanks to everybody helping me out so much with this (unfinished) project. Edited July 11, 2007 by nubbel Link to comment Share on other sites More sharing options...
Demarest Posted June 27, 2005 Share Posted June 27, 2005 First of all, you'll want to immitate existing code. Not so easy without a lot of accompanying english translation in the decompile. Most likely, the opcodes for such traditional items is the same. The way the engine's translated them were a bit different, which is why you want to immitate the existing style. Also, in both 3 and VC, the garage door was defined in a table in the EXE. Which means you'd have to use a door that already exists. That's if you want it to be animated. You don't have to as the garages are just cubes that are designed to recall vehicles in them during the save/load process. Link to comment Share on other sites More sharing options...
nubbel Posted June 27, 2005 Author Share Posted June 27, 2005 I was afraid that the garages at Mad Doggs mansion can't be opened But would it be possible to save cars in front of these garages? ^^ Im able to let cars spawn at these places, but would be nicer if you could save cars at these places, is there any "create_save_area" possibility? Link to comment Share on other sites More sharing options...
random_download Posted June 27, 2005 Share Posted June 27, 2005 Using the create garage opcode makes a cuboid, where any car that is inside of it will be saved. Link to comment Share on other sites More sharing options...
nubbel Posted June 28, 2005 Author Share Posted June 28, 2005 cool, where can I get more information about this and general information about coding this way? Link to comment Share on other sites More sharing options...
Demarest Posted June 28, 2005 Share Posted June 28, 2005 Um... right here in this thread A garage doesn't NEED to have a door or even be enclosed. In fact, WE just call it a garage. As far as the game is concerned, it's just a cube that when you save, any vehicles inside the cube are saved as well. VC was limited to 4 vehicles per cube though. So yes, your idea about Madd Dogg's should work if you put the cube outside his garage. If you're going to do that though, you should definitely NOT have any parked car generators there just to be safe. Link to comment Share on other sites More sharing options...
nubbel Posted June 28, 2005 Author Share Posted June 28, 2005 hehe yeah, sure! But I'm not really familiar to this "coding language". I wasn't able to find information about commands and good collections of tutorials etc. I guess I would be able to learn this coding style as I coded in different languages like turbo pascal, bit ASM, MS VB, bit C, PHP, JS, etc....but I have just the problem to find information about it on the internet Where can I get information and example codes? Link to comment Share on other sites More sharing options...
Quadropheniac90 Posted June 28, 2005 Share Posted June 28, 2005 Maybe if you want to create something, you can think something like this: "Hmmm, where have I seen something like that before?" Let's say for example: How do I create Thruth's Hippy Van? Then your conclusion will soon be: "I will have to look inside the missions Truth's vehicle is included in and find the vehicle ID in vehicles.dat from the data folder (at least I think that but this is just a simple example ) and search for create_car 482 in the missions Truth's car is in. When you find this there will most likely be an opcode with the name of the car in script, for example 35@. There will be an opcode with something like 35@ 0 with 35@ being the name of the vehicle and 0 being the paintjob + 1 so it will give the car the first paintjob that's defined in gta3.img. Hope I explained the following: Imitate (sound like Demarest now I think), look for the code in question in existing missions threads or main threads. Lot of chance the desired effect is already ingame. Hope this is the advice you wanted, just trying to help. Link to comment Share on other sites More sharing options...
nubbel Posted June 28, 2005 Author Share Posted June 28, 2005 I don't want to spawn a car! Spawning cars is no problem, I found good example codes and descriptions and tried this great success! I want to create areas in that you can save cars! Link to comment Share on other sites More sharing options...
nubbel Posted June 28, 2005 Author Share Posted June 28, 2005 I searched a bit and found some codes but they didn't help at all. I tried this: 0219: $mygar = create_garage_type 1 front 1240.485 -817.8582 84.14063 to 1257.092 -812.7582 89.81517 depth 1239.89 -800.8864 057A: set_garage $mygar max_cars_to 303DA: set_garage $mygar camera_follows_player But this doesn't work, no car is saved at this place (whole space in front of the 3 Mad Dogg mansion garages) Link to comment Share on other sites More sharing options...
Demarest Posted June 29, 2005 Share Posted June 29, 2005 That code looks "right". I say that having experience in 3/VC. If you're coding that in SA, it may be wrong as I've never even looked at SA's code and the syntax thereof. So if that's not SA but meant to be for SA, you'll (again) have to immitate the SA code you've found as it uses those same opcodes. After all, the way garages were defined between 3 and VC were different. Link to comment Share on other sites More sharing options...
Quadropheniac90 Posted June 29, 2005 Share Posted June 29, 2005 Offtopic: I didn't say you wanted to create a car, my point was to just look for example code but I see that didn't work, did it, sorry then for my comment. Link to comment Share on other sites More sharing options...
Quadropheniac90 Posted June 29, 2005 Share Posted June 29, 2005 (edited) Srry diuble post I haven't found these: 057A: set_garage $mygar max_cars_to 3 03DA: set_garage $mygar camera_follows_player in San Andreas, searched for opcode and I did another search for max_cars and just a look around much garage codes to find anything it could be. No luck Edited June 29, 2005 by teun.steenbekkers Link to comment Share on other sites More sharing options...
Demarest Posted June 29, 2005 Share Posted June 29, 2005 Setting max cars isn't required. Take the garage in Staunton for example. Large enough to house a brigade, but because that command was used to set max to 2, if you try to fit a 3rd in, it gives you the message that you can't. That's all. VC's engine had an insurpassable limit of 4 per cube. Link to comment Share on other sites More sharing options...
nubbel Posted July 1, 2005 Author Share Posted July 1, 2005 Sorry teun.steenbekkers, I didn't read your post very well. Searching the existing code was my second idea (after searching the internet), but just like you i wasnt lucky at all in finding something. But I will go on searching. I tried to set the max_cars var to atleast get a message (if I enter the garage in a 4th car) that shows me, that I have sucessfully created a garage area But that didn't work Link to comment Share on other sites More sharing options...
Opius Posted July 1, 2005 Share Posted July 1, 2005 Garages are defined in the IPL files, found in /DATA/MAPS/[area] Example grge715.806, -462.403, 14.9635, 724.293, -462.403, 715.806, -447.29, 21.4398, 1, 5, CEspray2227.6, 168.649, 26.4635, 2234.93, 168.649, 2227.6, 176.333, 29.4635, 1, 29, burbdoo783.155, -492.75, 16.3361, 789.029, -492.75, 783.155, -485.118, 19.3361, 1, 26, burbdo2end The garages are referred to in the script by their 8-byte name, seen at the end of the of the line. Example. 0299: activate_garage 'BURBDOO' Link to comment Share on other sites More sharing options...
nubbel Posted July 1, 2005 Author Share Posted July 1, 2005 (edited) Opius, would you marry me?!? This is great, and so easy! /data/maps/LA/LAhills.ipl: 1240.48, -817.858, 82.135, 1239.89, -800.886, 1257.09, -812.758 87.135, 1, 32, DoggGRG It seems that you don't have to make a "activate_garage" at all when you add a new garage area, so they are activated by default. Do you know what the last two parameters before the garage identifier/name mean? I don't have a clue...But somewhere there has to be a value for max cars allowed in these garages And do you think it's possible to let the camera not follow the player like it uses to follow in a garage, but to follow the player like you are walking around anywhere? And finally: where did you get this information from? Is there any source that could help me any further with similar issues? Thanks, nubbel Edited July 1, 2005 by nubbel Link to comment Share on other sites More sharing options...
Demarest Posted July 1, 2005 Share Posted July 1, 2005 OP saves the day! Is the door part still like it used to be whereby if the door's name isn't listed in the EXE table, it won't raise automatically? Link to comment Share on other sites More sharing options...
Tim88 Posted July 1, 2005 Share Posted July 1, 2005 Sounds great, would we be able to create new garages? I also heard and saw the name Marina carpark, would such a thing be possible in gta? Well sounds cool, i'll be watching:P Link to comment Share on other sites More sharing options...
nubbel Posted July 1, 2005 Author Share Posted July 1, 2005 (edited) OP saves the day! Is the door part still like it used to be whereby if the door's name isn't listed in the EXE table, it won't raise automatically? There is no door, I just can now park cars in front of the 3 garages at Mad Doggs mansion and they are saved. It's just an area that acts like a garage, when you walk in it the camera points at you like when you are in a garage. This is the only annoying thing, but maybe it can be solved and it's not that bad. Tim88: Yes, seems that you can specify areas in that you can store cars in like in a garage, but I'm not sure if this could cause any trouble. I read a bit of the Marina Carpark code from Vice City, but the way this guy does it is very different and advanced coding. But I also hope that one day anyone could create a similar park garage. Edited July 1, 2005 by nubbel Link to comment Share on other sites More sharing options...
Tim88 Posted July 1, 2005 Share Posted July 1, 2005 Well this sounds great, if we can add some area;'s, like on the airstrip, and some empty spaces near your save point you can add ur own verhicle collection:P Sounds awesome, im satisfied enough if you guys can manage that. ( like marina is cool , but takes a very long time to create) Link to comment Share on other sites More sharing options...
Demarest Posted July 1, 2005 Share Posted July 1, 2005 There is no door, I just can now park cars in front of the 3 garages at Mad Doggs mansion and they are saved. It's just an area that acts like a garage, when you walk in it the camera points at you like when you are in a garage.This is the only annoying thing, but maybe it can be solved and it's not that bad. Oh, I know. Just OP pointed out that they're done differently from before and I wanted to check how differently. For that matter... @Opius: Also, are we limited to amounts? Like VC could only add one more before you had to replace them. Surely the savegame limits this somehow. Is that true? Does anybody know the limit? Link to comment Share on other sites More sharing options...
PatrickW Posted July 2, 2005 Share Posted July 2, 2005 I read a bit of the Marina Carpark code from Vice City, but the way this guy does it is very different and advanced coding. But I also hope that one day anyone could create a similar park garage. The brilliant guy that made the marina carpark mod, is a bit of a lazy bum. But I happen to know some intimate secrets about him, that he doesn't want to have published on the net. So I might be able to blackmail him into creating a carpark mod for SA... @Demarest: Apart from the fact thet they're defined in the IPL files, not much is known about them yet. Some research is needed in this matter... Link to comment Share on other sites More sharing options...
nubbel Posted July 2, 2005 Author Share Posted July 2, 2005 Hehe ok, we will see. The code for the Marina Carpark Mod is really nice to read. But coding similar stuff isn't that easy I think. But the IPL way works very well for my personal needs, it's easy and effective. You don't have to change the MAIN.SCM what means you can add garage areas without losing your saves. Link to comment Share on other sites More sharing options...
Demarest Posted July 2, 2005 Share Posted July 2, 2005 The brilliant guy that made the marina carpark mod, is a bit of a lazy bum. But I happen to know some intimate secrets about him, that he doesn't want to have published on the net. So I might be able to blackmail him into creating a carpark mod for SA... Yeah, that guy's insane. I mean, who needs 40 vehicles? Thanks for the info. I hope those of you on the case have good luck in tracking all that down. Link to comment Share on other sites More sharing options...
V41N Posted July 5, 2005 Share Posted July 5, 2005 I have an idea, how about placing two garages congruently to create a larger one that hold more vehicles? Would this be possible? Also, how did you come up with the coordinates for the IPL file? I have the place manager to get coordinates, but there are more needed for depth and what-not that I'm not familiar with. Link to comment Share on other sites More sharing options...
PatrickW Posted July 5, 2005 Share Posted July 5, 2005 Placing two garages on top of eachother will most likely confuse the hell out of the engine. The most likely scenario, is that when you drive a car in , both garages will register it. And when you return to the garage, both garages will generate car which will be on top of eachother, damaging them terribly. But the best way to find things out, is not to trust what people on a forum say, but try things out yourself. If I had listened to the very wise people on this forum, when I came with the idea for the marina carpark....the thing would have never been created...... ( and certainly not with 40 cars ) A solution would be to have two Garage-cubes adjecent to eachother. But then it will only save 4 cars in each half of the garage, and if you place five cars in the same half you will loose one.... Link to comment Share on other sites More sharing options...
Y_Less Posted July 5, 2005 Share Posted July 5, 2005 You can define (up to a limit) how many cars a garage can hold, so sticking two together is not nescesarry. Also, a marina carpark mod for SA would be much easier with arrays. Edit: OK, Pat's reply was better. Link to comment Share on other sites More sharing options...
V41N Posted July 5, 2005 Share Posted July 5, 2005 A solution would be to have two Garage-cubes adjecent to eachother. But then it will only save 4 cars in each half of the garage, and if you place five cars in the same half you will loose one.... Sorry I thought Congruent meant side-by-side.. lol ( I failed Geometry, but was a wiz at algebra a least ) If it's a garage won't it warn you when it is full? Even if it still let's you drive in. @Y_les, I thought the limit was still 4... Do you mean there is a way to increase the limit? Link to comment Share on other sites More sharing options...
Demarest Posted July 5, 2005 Share Posted July 5, 2005 Setting max cars isn't required. Take the garage in Staunton for example. Large enough to house a brigade, but because that command was used to set max to 2, if you try to fit a 3rd in, it gives you the message that you can't. That's all. VC's engine had an insurpassable limit of 4 per cube. Link to comment Share on other sites More sharing options...
Recommended Posts