Jump to content

New Savegame places.


aacclapd

Recommended Posts

Does anybody Know how to create new points for savegame. i read that it depends on the sco files, amb_savebed exactly and i dont really know how to edit them but if someone can tell me that im wrong and the savegame actions dont depend of sco script files.can anybody tell me how?

Link to comment
Share on other sites

Here is a mod that makes the majestic hotel a safe house.

 

It's a .net script. I think it might help.

 

EDIT: It's a .VB script and requires .net scripthook.

 

 

Imports SystemImports System.Windows.FormsImports GTAPublic Class Majestic  Inherits Script  Dim Spawncoords As New Vector3(-180.8, 580.4, 122.8)  Private Doormodel As Model = "ab_ritz_aptdoor"  Dim coordies As New Vector3(-160.0, 591.0, 119.0)  Dim coordies2 As New Vector3(-160.0, 593.0, 119.0)  Dim coordies3 As New Vector3(-155.66, 592.7, 359.42)  Dim coordies4 As New Vector3(-144.25, 6107.32, 14.3)  Public Sub New()      Interval = 500      If Player.Character.Exists = True Then          Game.FadeScreenOut(1000, True)          'Game.LoadEnvironmentNow(Spawncoords)          Player.Character.Position = Spawncoords          World.CreateVehicle("MAVERICK", coordies3)          Game.FadeScreenIn(1000)      Else      End If  End Sub  Private Sub Majestic_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick      Dim Var6 As Single = 0      SetStateOfClosestDoorOfType(Doormodel, coordies, 0, Var6)      SetStateOfClosestDoorOfType(Doormodel, coordies2, 0, Var6)  End Sub  Private Sub SetStateOfClosestDoorOfType(ByVal o As GTA.Model, ByVal coords As Vector3, ByVal locked As Boolean, ByVal angle As Single)      Native.Function.Call("SET_STATE_OF_CLOSEST_DOOR_OF_TYPE", o, coords.X, coords.Y, coords.Z, locked, angle)  End Sub  Private Sub Majestic_KeyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown      Select Case e.Key          Case Keys.F              Dim PPos As Vector3 = Player.Character.Position              Dim LiftTop As New Vector3(-184.07, 597.44, 114.44)              Dim LiftBottom As New Vector3(-182.0, 597.4, 15.6)              If PPos.DistanceTo(LiftTop) < 4 Then                  Game.FadeScreenOut(1000, True)                  Player.Character.Position = LiftBottom                  Player.Character.Heading = 280                  'Game.LoadEnvironmentNow(LiftBottom)                  Game.FadeScreenIn(1000)              ElseIf PPos.DistanceTo(LiftBottom) < 4 Then                  Game.FadeScreenOut(1000, True)                  'Game.LoadEnvironmentNow(LiftTop)                  Player.Character.Position = LiftTop                  Player.Character.Heading = 280                  Game.FadeScreenIn(2000)              ElseIf PPos.DistanceTo(Spawncoords) < 5 Then                  Game.ShowSaveMenu()              End If      End Select  End SubEnd Class

 

Link to comment
Share on other sites

i mean how to make a new one, i dont want another mod.besides, i dont get what file is located that code.

Link to comment
Share on other sites

 

i mean how to make a new one, i dont want another mod.besides, i dont get what file is located that code.

just to let you know that once you have the source code/sco file, you're able to edited that script. now since you have a .vb script example of save house points that smiley gave you, logic should tell you that you can change the save point location in that script to make a new safe house coding.

Edited by hardsty1e
Link to comment
Share on other sites

ok man but i have to be careful with all details because some of them are confusing

anyway one more question:

where is this code located? i think that in amb_savebed.sco im not wrong, am i?

 

Thanks @SmileyHam icon14.gif

Edited by aacclapd
Link to comment
Share on other sites

 

ok man but i have to be careful with all details because some of them are confusing

anyway one more question:

where is this code located? i think that in amb_savebed.sco im not wrong, am i?

 

Thanks @SmileyHam icon14.gif

I don't think it's like that.

 

The last lines of code in the script;

 

"ElseIf PPos.DistanceTo(Spawncoords) < 5 Then

Game.ShowSaveMenu()"

 

This is in the script I posted. It's basically the distance away from the object which in this case is an already spawned bed from the building.

 

So if the player position is near the object, when F is pressed the Save Menu pops up.

 

 

No animation is played. Maybe you can add that on your own.

 

----

You can edit it to;

1. Spawn a bed. Any normal bed object.

2. When near it if F(save game key) is pressed it will play the animation of Niko sleeping.

3. Make save menu pop-up

4. Have Niko play the animation of getting up from bed

 

NOTE: The script is outdated and might not work, never tested it with 1.0.7.0

Edited by SmileyHam
Link to comment
Share on other sites

well, thanks i'll see what i do. icon14.gif

i can create coords with the trainer so i can put them later in right place.

Link to comment
Share on other sites

Here are the animation names;

 

[email protected]

 

upset_get_out_bed_l -- I think used after some missions

angry_get_out_bed_l -- Same as above

upset_in_bed_idle -- Above

get_out_bed_l -- This one; LEFT SIDE OUT OF BED

get_out_bed_r -- This one; RIGHT SIDE OUT OF BED

lie_on_bed_l -- This one; LEFT

lie_on_bed_r --This one; RIGHT

 

 

 

I'm trying to help as much as I can because I'm not a scripter. I know 0% code and I want a mod like this too.

 

Hope you succeed.

Link to comment
Share on other sites

thank you man i will do it when i came back from my holidays(no gta iv stuff available until then). smile.gif

Link to comment
Share on other sites

thank you man i will do it when i came back from my holidays(no gta iv stuff available until then). smile.gif

Alright just take note from my other post. The script I posted is outdated. Might not work for 1.0.7.0.

 

I'll test it soon and tell you if it does work.

Link to comment
Share on other sites

ok man.i will be able to browse gtaforums in holidays anyway.

Link to comment
Share on other sites

Bad news. It doesn't work.

 

 

 

 

Good news. I edited and now it's working. biggrin.gif

 

Link is here; Majestic Hotel SafeHouse

 

Below are the lines that I have removed because it doesn't work with 1.0.7.0

 

 

 

'Game.LoadEnvironmentNow(Spawncoords)          'Game.LoadEnvironmentNow(LiftBottom)          'Game.LoadEnvironmentNow(LiftTop)

 

 

Not sure what they are for. I'm guessing load the map when you spawn. But the game does that automatically.

 

Also I'm not sure about the ' added before each function. Maybe that was causing the problem? confused.gif

 

Anyway it works now. The script automatically teleports you to the safe house as the game starts (Might remove this)

 

 

1 problem that I've noticed for this mod. The elevator at the top is missing (because it's a separate object that must be added manually, might add this since the mod doesn't add it for you)

 

 

I might fix the script up, give it animation when sitting in bed, make elevator spawn and release it (Obviously giving credit to the creator of it.)

 

Good luck!

Link to comment
Share on other sites

Hey man, I have been trying to do this as well using C++, but now I see that it works in VB.

 

I read your success post. smile.gif Were you able to get Niko to sleep on the bed, save, then wake up? I know it is silly to ask this since you had an updated version and should have animations working but I want to know is it flawless in the save sequence just like saving in any of rockstar's savehouses.

 

edit: Sorry, for hastily posting, apparently animations are not done yet, I read the script. smile.gif Hope you succeed though, since Sco alterations must require a start of a new game, I was hoping to get it to work on the scripthooks.

Edited by Limiter
Link to comment
Share on other sites

Hey man, I have been trying to do this as well using C++, but now I see that it works in VB.

 

I read your success post. smile.gif Were you able to get Niko to sleep on the bed, save, then wake up? I know it is silly to ask this since you had an updated version and should have animations working but I want to know is it flawless in the save sequence just like saving in any of rockstar's savehouses.

 

edit: Sorry, for hastily posting, apparently animations are not done yet, I read the script. smile.gif Hope you succeed though, since Sco alterations must require a start of a new game, I was hoping to get it to work on the scripthooks.

No it doesn't work flawlessly.

 

There is a problem I have no idea how you can make it so that the script when it saves the game and you reload it you spawn back at majestic.

 

There is a function in the script that automatically teleports you to the majestic as the game starts but you can't save in other houses.

 

Is there a way to make the script create a .txt file within game and edit it and save it to the GTA IV main directory?

 

I save the game at the bed, then I reload it to see what happens and I respawn back at another house (Note that I removed the part where the script teleports you)

 

 

Also this mod spawns a Maverick at the top of the building. Will change that to Annihilator tounge.gif

 

 

I think I should be able to insert an animation playing function even though I have no idea how to script.

 

 

Another problem; I don't know if it bugs you people but at the room where you save your game the 2 doors at the entrance are locked, meaning when you touch them and push them you will go through but they will reset back at 0 degrees. You can't shoot them either. I'll look into that.

Link to comment
Share on other sites

Also the amb_savebed.sco is actually ambsavebed.sco

 

 

That's what I've heard. No space inmbetween.

Link to comment
Share on other sites

Anyway it works now. The script automatically teleports you to the safe house as the game starts (Might remove this)

This part confused me, it made it seems like you got it working and the script teleports you to the majestic as the game starts. smile.gif

Link to comment
Share on other sites

Anyway it works now. The script automatically teleports you to the safe house as the game starts (Might remove this)

This part confused me, it made it seems like you got it working and the script teleports you to the majestic as the game starts. smile.gif

You spawn at the safehouse you saved in game but the script automatically teleports you near the bed at majestic.

 

Problem is that if you remove the teleporting function, if you save the game you won't spawn there. It's not possible to make that unless you make an .asi or .net script which creates a .ini file and edits it so if you save at the house it enters in the .ini file "Recent save location = Majestic, if so then spawn there, if not spawn at other recent save location"

Link to comment
Share on other sites

Perfect man, my top priority was to write the code in C++ using Aru's Scripthook. That way, it will be a .asi.

 

But problem is, wouldn't the .ini file overload? For example, if it keeps writing "Recent save location = Majestic" every time you save, will the file get bigger?

 

Or is it just a variable that keeps changing its value?

Link to comment
Share on other sites

 

Perfect man, my top priority was to write the code in C++ using Aru's Scripthook. That way, it will be a .asi.

 

But problem is, wouldn't the .ini file overload? For example, if it keeps writing "Recent save location = Majestic" every time you save, will the file get bigger?

 

Or is it just a variable that keeps changing its value?

A variable that has it's value changed.

 

 

Something like this.

 

 

RecentSaveLocation = House0

House1 = Broker ---Not necessary to have this, just the coords but it keeps the script organized so you know what is what.

House1Coords = (Whatever)

House 2 = Algonquin

House2Coords = (Whatever)

ALL OTHER HOUSES = Whatever

ALL OTHER HOUSES COORDS = Whatever

 

(The name of the house along with coordinates of the bed location.) So if player has saved the game within the range of those coordinates it changes the variable RecentSaveLocation to the "house1" or "house2" ect depending which coords the player was near and the script teleports you to that save house (Only necessary for Majestic, you will spawn at other houses normally)

 

I'll explain better if you don't understand.

Edited by SmileyHam
Link to comment
Share on other sites

Also if you're surely making this into an .asi then I won't bother fixing it up. Anyway good luck.

Link to comment
Share on other sites

Is this for personal use or planning for a new mod?

Both.

 

Limiter wants to do a public mod.

aacclapd wants for personal use.

I want to fix it up for myself for fun.

Link to comment
Share on other sites

"LoadEnvironmentNow" does work with 1.0.7.0, you just need to learn how to use it. VB/C# prog should tell you.

 

 

'Game.LoadEnvironmentNow(Spawncoords)

'Game.LoadEnvironmentNow(LiftBottom)

'Game.LoadEnvironmentNow(LiftTop)

 

 

"Spawncoords" should spawn maverick at vector "coordies3"

 

 

Dim Spawncoords As New Vector3(-180.8, 580.4, 122.8)

....

Dim coordies3 As New Vector3(-155.66, 592.7, 359.42)

....

'Game.LoadEnvironmentNow(Spawncoords)

Player.Character.Position = Spawncoords

World.CreateVehicle("MAVERICK", coordies3)

 

 

 

"LiftBottom" would spawn a building lift object I would think and if your at the trigger position, the game would fade and spawn you down the side of the building, instead of having a scripted building lift that would move the lift object down the side of the building to the ground.

 

also I would suggest to convert to C#, vb is so messy tounge2.gif

Edited by hardsty1e
Link to comment
Share on other sites

"LoadEnvironmentNow" does work with 1.0.7.0, you just need to learn how to use it. VB/C# prog should tell you.

 

 

'Game.LoadEnvironmentNow(Spawncoords)

'Game.LoadEnvironmentNow(LiftBottom)

'Game.LoadEnvironmentNow(LiftTop)

 

 

"Spawncoords" should spawn maverick at vector "coordies3"

 

 

Dim Spawncoords As New Vector3(-180.8, 580.4, 122.8)

....

Dim coordies3 As New Vector3(-155.66, 592.7, 359.42)

....

'Game.LoadEnvironmentNow(Spawncoords)

Player.Character.Position = Spawncoords

World.CreateVehicle("MAVERICK", coordies3)

 

 

 

"LiftBottom" would spawn a building lift object I would think and if your at the trigger position, the game would fade and spawn you down the side of the building, instead of having a scripted building lift that would move the lift object down the side of the building to the ground.

 

also I would suggest to convert to C#, vb is so messy tounge2.gif

So the LoadEnviornment function basically loads the location at the coordinates?

Link to comment
Share on other sites

Okay, so I understand that how to get the .asi to write in the .ini with "majestic" or whatever the safehouse's name is when the script activates to save the game at majestic.

 

But, how do you get this script to activate when you save at rockstar's safehouses. For example, when you save at rockstar's safehouses, the .asi will not activate since it is not at Majestic's bed. Thus, it will not be able to write in the .ini with "other_house". In this case, whenever "other_house" is in the .ini, the script will not spawn at "Majestic."

 

Is there a specific function that allows the .asi to run whenever you save your game regardless of location? We need this so that it can constantly rewrite the .ini with Niko's save position.

Link to comment
Share on other sites

Hi @all,

 

this is a preview of my "New SafeHouse.asi" mod:

 

 

 

 

 

Early Beta version:

- Without "go to bed" animation

- Over 15 safe houses addad (eg. Majestic Hotel, Playboy X, Crackhouse, Lawyer Office and old safehouses (from GTA IV) in EFLC...)

 

Load your game and you will start at the right safehouse (at the safehouse you saved)!

 

Don't forget: This is an early beta version! Final mod coming soon... biggrin.gif

 

Link to comment
Share on other sites

How did you get the game to load at the correct safe house? Did you use the .ini method mentioned a few post earlier?

 

Also, I think we request animations via this in C++, from what I learnt while reading the superman script by nixolas:

 

 

RequestAnims("amb@savegame");

 

 

[email protected] contains the sleeping animations as mentioned by SmileyHam. wink.gif

Edited by Limiter
Link to comment
Share on other sites

Hi @all,

 

this is a preview of my "New SafeHouse.asi" mod:

 

 

 

 

 

Early Beta version:

- Without "go to bed" animation

- Over 15 safe houses addad (eg. Majestic Hotel, Playboy X, Crackhouse, Lawyer Office and old safehouses (from GTA IV) in EFLC...)

 

Load your game and you will start at the right safehouse (at the safehouse you saved)!

 

Don't forget: This is an early beta version! Final mod coming soon... biggrin.gif

I love you.

 

 

Once the final version is done post it here please smile.gif

 

Also did you do this because you saw this thread?

Link to comment
Share on other sites

Here is a little challenge for the mod.

 

As some of you may know, GTARandom of IV:SA has gotten custom televisions to work. Of course, I believe he done this via sco coding. But for our purpose, sco alterations require a start of a new game. So my challenge here is this. Is there a way to implement within this safehouse mod a "custom television script." In other words, if one of the additional safehouses included in this mod have got a TV inside, can that TV be coded such that the player character can sit down and watch TV, also changing channels just like Rockstar's TV in other safehouses.

 

Aside from this challenge, why not include a wardrobe where the player can change outfit. I know this is possible since the SNT can do this. All we need is the same type of logic but activate by going near some specified coordinates designated as a wardrobe.

Link to comment
Share on other sites

 

How did you get the game to load at the correct safe house?

Simple roomkey and area check biggrin.gif

 

 

Also did you do this because you saw this thread?

No, it's an 'old' idea (Jan. 2012)... look here!

But I've made the clip becuase I saw this topic smile.gif

 

 

Is there a way to implement within this safehouse mod a "custom television script." In other words, if one of the additional safehouses included in this mod have got a TV inside, can that TV be coded such that the player character can sit down and watch TV, also changing channels just like Rockstar's TV in other safehouses.

This is possible but very hard to code...

 

 

Aside from this challenge, why not include a wardrobe where the player can change outfit. I know this is possible since the SNT can do this. All we need is the same type of logic but activate by going near some specified coordinates designated as a wardrobe.

To change the outfit is not the problem but to check the outfit you already own is nearly impossible!

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.