IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (2) [1] 2   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 New Savegame places.

 How to Create new savegame places.
 
aacclapd  
Posted: Thursday, Jul 5 2012, 10:42
Quote Post


Map Modder
Group Icon
Group: Members
Joined: Jan 6, 2012

es.gif

XXXXX



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?
PM
  Top
 

 
SmileyHam  
Posted: Thursday, Jul 5 2012, 12:40
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



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.

CODE
Imports System
Imports System.Windows.Forms
Imports GTA

Public 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 Sub

End Class
PM
  Top
 

 
aacclapd  
Posted: Thursday, Jul 5 2012, 14:36
Quote Post


Map Modder
Group Icon
Group: Members
Joined: Jan 6, 2012

es.gif

XXXXX



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

 
hardsty1e  
Posted: Thursday, Jul 5 2012, 18:08
Quote Post


Rat
Group Icon
Group: Members
Joined: May 2, 2009

XXXXX



QUOTE (aacclapd @ Thursday, Jul 5 2012, 14:36)
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.

This post has been edited by hardsty1e on Thursday, Jul 5 2012, 19:44
PM
  Top
 

 
aacclapd  
Posted: Thursday, Jul 5 2012, 21:29
Quote Post


Map Modder
Group Icon
Group: Members
Joined: Jan 6, 2012

es.gif

XXXXX



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

This post has been edited by aacclapd on Thursday, Jul 5 2012, 21:35
PM
  Top
 

 
SmileyHam  
Posted: Thursday, Jul 5 2012, 21:56
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



QUOTE (aacclapd @ Thursday, Jul 5 2012, 21:29)
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

This post has been edited by SmileyHam on Thursday, Jul 5 2012, 22:01
PM
  Top
 

 
aacclapd  
Posted: Thursday, Jul 5 2012, 22:00
Quote Post


Map Modder
Group Icon
Group: Members
Joined: Jan 6, 2012

es.gif

XXXXX



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

 
SmileyHam  
Posted: Thursday, Jul 5 2012, 22:07
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



Here are the animation names;

amb@savegame.wad

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

 
aacclapd  
Posted: Thursday, Jul 5 2012, 22:09
Quote Post


Map Modder
Group Icon
Group: Members
Joined: Jan 6, 2012

es.gif

XXXXX



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

 
SmileyHam  
Posted: Thursday, Jul 5 2012, 22:11
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



QUOTE (aacclapd @ Thursday, Jul 5 2012, 22:09)
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.
PM
  Top
 

 
aacclapd  
Posted: Thursday, Jul 5 2012, 22:12
Quote Post


Map Modder
Group Icon
Group: Members
Joined: Jan 6, 2012

es.gif

XXXXX



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

 
SmileyHam  
Posted: Thursday, Jul 5 2012, 23:09
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



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


CODE
'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!
PM
  Top
 

 
Limiter  
Posted: Friday, Jul 6 2012, 07:26
Quote Post


GTA Modder
Group Icon
Group: Members
Joined: Dec 3, 2010

cd.gif

XXXXX



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.

This post has been edited by Limiter on Friday, Jul 6 2012, 07:32
PM
  Top
 

 
SmileyHam  
Posted: Friday, Jul 6 2012, 13:30
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



QUOTE (Limiter @ Friday, Jul 6 2012, 07:26)
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.
PM
  Top
 

 
SmileyHam  
Posted: Friday, Jul 6 2012, 14:49
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



Also the amb_savebed.sco is actually ambsavebed.sco


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

 
Limiter  
Posted: Friday, Jul 6 2012, 21:27
Quote Post


GTA Modder
Group Icon
Group: Members
Joined: Dec 3, 2010

cd.gif

XXXXX



QUOTE (SmileyHam @ Thursday, Jul 5 2012, 23:09)
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
PM
  Top
 

 
SmileyHam  
Posted: Saturday, Jul 7 2012, 01:56
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



QUOTE (Limiter @ Friday, Jul 6 2012, 21:27)
QUOTE (SmileyHam @ Thursday, Jul 5 2012, 23:09)
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"
PM
  Top
 

 
Limiter  
Posted: Saturday, Jul 7 2012, 07:19
Quote Post


GTA Modder
Group Icon
Group: Members
Joined: Dec 3, 2010

cd.gif

XXXXX



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?
PM
  Top
 

 
SmileyHam  
Posted: Saturday, Jul 7 2012, 15:54
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



QUOTE (Limiter @ Saturday, Jul 7 2012, 07:19)
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.

This post has been edited by SmileyHam on Saturday, Jul 7 2012, 15:57
PM
  Top
 

 
SmileyHam  
Posted: Saturday, Jul 7 2012, 15:59
Quote Post


Peon
Group Icon
Group: Members
Joined: Apr 17, 2011

XXXXX



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

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (2) [1] 2 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG