Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

nubbel

savegarage creation

Recommended Posts

nubbel

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) tounge.gif

But I'm not really able to work with this sort of code confused.gif

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 by nubbel

Share this post


Link to post
Share on other sites
Demarest
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.

Share this post


Link to post
Share on other sites
nubbel

I was afraid that the garages at Mad Doggs mansion can't be opened confused.gif

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? tounge.gif

Share this post


Link to post
Share on other sites
random_download

Using the create garage opcode makes a cuboid, where any car that is inside of it will be saved.

Share this post


Link to post
Share on other sites
nubbel

cool, where can I get more information about this and general information about coding this way?

Share this post


Link to post
Share on other sites
Demarest
Um... right here in this thread tounge.gif 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.

Share this post


Link to post
Share on other sites
nubbel

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 confused.gif

Where can I get information and example codes?

Share this post


Link to post
Share on other sites
Quadropheniac90
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 biggrin.gif ) 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 [email protected] There will be an opcode with something like [email protected] 0 with [email protected] 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. biggrin.gif Hope this is the advice you wanted, just trying to help.

Share this post


Link to post
Share on other sites
nubbel

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!

Share this post


Link to post
Share on other sites
nubbel

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)

Share this post


Link to post
Share on other sites
Demarest
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.

Share this post


Link to post
Share on other sites
Quadropheniac90
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.

Share this post


Link to post
Share on other sites
Quadropheniac90

Srry diuble post blush.gif

 

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 sad.gif

Edited by teun.steenbekkers

Share this post


Link to post
Share on other sites
Demarest
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.

Share this post


Link to post
Share on other sites
nubbel

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 tounge.gif

But that didn't work confused.gif

Share this post


Link to post
Share on other sites
Opius

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'  

 

Share this post


Link to post
Share on other sites
nubbel

Opius, would you marry me?!? inlove.giflol.gif

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 dozingoff.gif

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 by nubbel

Share this post


Link to post
Share on other sites
Demarest

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?

Share this post


Link to post
Share on other sites
Tim88

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

Share this post


Link to post
Share on other sites
nubbel

 

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 by nubbel

Share this post


Link to post
Share on other sites
Tim88

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)

Share this post


Link to post
Share on other sites
Demarest
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?

Share this post


Link to post
Share on other sites
PatrickW

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...

 

Share this post


Link to post
Share on other sites
nubbel

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.

Share this post


Link to post
Share on other sites
Demarest
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? lol.gifwink.gif

 

Thanks for the info. I hope those of you on the case have good luck in tracking all that down.

Share this post


Link to post
Share on other sites
V41N

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.

Share this post


Link to post
Share on other sites
PatrickW

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 tounge.gif )

 

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....

Share this post


Link to post
Share on other sites
Y_Less

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.

Share this post


Link to post
Share on other sites
V41N
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?

 

Share this post


Link to post
Share on other sites
Demarest
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.

tounge.gif

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.