QuickSaveMod Now With Item Saving ~ by Hg341

Hg341
Posts: 94
Joined: Mon Oct 08, 2012 9:35 pm

QuickSaveMod Now With Item Saving ~ by Hg341

Post by Hg341 » Mon Oct 15, 2012 8:44 pm

UPDATE i have Item Slot saving working now


a quick video showing off the basic functions of the mod



To Use : hit "Y" to create a savepoint and hit "R" to load it

To Install: Simply download version 2.0 open it and drag the "data" folder to "Program Files (x86)\Wolfire\Overgrowth\" and click yes to all prompts.

To Uninstall: Open 193Scripts and copy the aschar.as file to "Program Files (x86)\Wolfire\Overgrowth\Data\Scripts" and again click yes to all prompts.


Change Log

VER 0.1.0
+ position saving
VER 1.0.0
+ enemy mind wiping
+ hotspots
VER 2.0.0
+ item slot saving


Know Bugs
  • trying to reset while draging a body will CTD ~ seems to not happen every time
  • Dying in side of a save hotspot should be avoided
  • Rarely an enitey will get stuck as if you had froze them while they were ragdolling,
    and resetting wont move them to fix this hit z then let it roll
  • WARNING; to map makers if you plan on using this mod be warning that due to a bug in davids code if you place a sword and sheathe in the same slot one of them wont appear in the data slots so they wont be saved by my mod
Attachments
QuickSaveMod ~ version 2.0.zip
(87.86 KiB) Downloaded 75 times
QuickSaveMod VER 1.0.zip
(86.19 KiB) Downloaded 38 times
Last edited by Hg341 on Sat Nov 10, 2012 9:11 pm, edited 12 times in total.

User avatar
Constance
Overgrowth Modder Deluxe
Posts: 2394
Joined: Sat Mar 17, 2012 2:05 pm
Contact:

Re: First mod(script) ~ very simple position saving and tele

Post by Constance » Tue Oct 16, 2012 12:08 am

So R would save the position you want to teleport to, and Y would teleport you there?

User avatar
Black_Stormy
Posts: 161
Joined: Sat Mar 12, 2011 2:42 am

Re: First mod(script) ~ very simple position saving and tele

Post by Black_Stormy » Tue Oct 16, 2012 12:51 am

Looks like that's what that code does. It's like Morrowind Mark and Recall.

User avatar
CryptoSeven
Posts: 99
Joined: Sun Aug 19, 2012 1:42 pm

Re: First mod(script) ~ very simple position saving and tele

Post by CryptoSeven » Tue Oct 16, 2012 8:10 am

Excellent idea. Sort of a primitive quicksave system.

Might be worth expanding a bit on it to track enemy positions and such and voila you got an awesome quicksave mod.

Hg341
Posts: 94
Joined: Mon Oct 08, 2012 9:35 pm

Re: First mod(script) ~ very simple position saving and tele

Post by Hg341 » Tue Oct 16, 2012 9:23 am

CryptoSeven wrote:Excellent idea. Sort of a primitive quicksave system.

Might be worth expanding a bit on it to track enemy positions and such and voila you got an awesome quicksave mod.

my first tests with the script were on maps with no bots. i tried it on a map with some and it turns out it saves the position of all loaded entities and then teleports them. so basicly this is a quick save mod.

EDIT; ill upload a video after work and ill try to work out the char id system so i can make it save the state of entities(ie passed out awake dead). oh yea this scrip wont work if your radolled not sure why atm

User avatar
CryptoSeven
Posts: 99
Joined: Sun Aug 19, 2012 1:42 pm

Re: First mod(script) ~ very simple position saving and tele

Post by CryptoSeven » Tue Oct 16, 2012 10:29 am

Ahh yes that's great.

I actually tinkered already with a health check so characters that were alive will recover health. Not perfect since they recover full health and also you have to press load button twice if they've been killed but gets the job done. Feel free to improve on it.

Code: Select all

vec3 savepos = this_mo.position;
float save_knocked_out = knocked_out;
void HandleSpecialKeyPresses() {
	if(GetInputDown(this_mo.controller_id, "r")){
		save_knocked_out = knocked_out;
		savepos = this_mo.position;
      }
      if(GetInputDown(this_mo.controller_id, "y")){
	  if (save_knocked_out == _awake) {RecoverHealth();}
	  this_mo.position = savepos;
      }
	  
	  
Another thing is enemies alertness state. Would be nice to reset that so they don't chase you after reset.

User avatar
last
Posts: 2154
Joined: Fri Jan 07, 2011 7:02 am
Location: Estonia

Re: First mod(script) ~ very simple position saving and tele

Post by last » Tue Oct 16, 2012 12:29 pm

I wonder if this code can be executed with a checkpoint? It would be really cool when it does so we can place some autosave checkpoints onto parkour maps.

User avatar
Constance
Overgrowth Modder Deluxe
Posts: 2394
Joined: Sat Mar 17, 2012 2:05 pm
Contact:

Re: First mod(script) ~ very simple position saving and tele

Post by Constance » Tue Oct 16, 2012 6:05 pm

Yay, we're doing checkpoints now!

Hg341
Posts: 94
Joined: Mon Oct 08, 2012 9:35 pm

Re: First mod(script) ~ very simple position saving and tele

Post by Hg341 » Tue Oct 16, 2012 7:16 pm

CryptoSeven wrote:Ahh yes that's great.

I actually tinkered already with a health check so characters that were alive will recover health. Not perfect since they recover full health and also you have to press load button twice if they've been killed but gets the job done. Feel free to improve on it.

Code: Select all

vec3 savepos = this_mo.position;
float save_knocked_out = knocked_out;
void HandleSpecialKeyPresses() {
	if(GetInputDown(this_mo.controller_id, "r")){
		save_knocked_out = knocked_out;
		savepos = this_mo.position;
      }
      if(GetInputDown(this_mo.controller_id, "y")){
	  if (save_knocked_out == _awake) {RecoverHealth();}
	  this_mo.position = savepos;
      }
	  
	  
Another thing is enemies alertness state. Would be nice to reset that so they don't chase you after reset.

yea ill start working on it. if anyone has some example scripts for how hotspots work itd be great if you could link it here

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: First mod(script) ~ very simple position saving and tele

Post by Korban3 » Tue Oct 16, 2012 7:20 pm

Excellent first mod, sirrah.

Hg341
Posts: 94
Joined: Mon Oct 08, 2012 9:35 pm

Re: First mod(script) ~ very simple position saving and tele

Post by Hg341 » Tue Oct 16, 2012 8:10 pm

Korban3 wrote:Excellent first mod, sirrah.
why thanks

Code: Select all

vec3 savepos = this_mo.position;
float save_knocked_out = knocked_out;

	    if(GetInputDown(this_mo.controller_id, "v")){
		save_knocked_out = knocked_out;
		savepos = this_mo.position;
		}
		if(GetInputDown(this_mo.controller_id, "y")){
		recover();
		this_mo.position = savepos;
		if (save_knocked_out !=_awake) {knocked_out = _unconscious;}
		}
the changes properly save awake state .ill work out AI state and how to toggle it then ill work on item states.

User avatar
SteelRaven7
Posts: 681
Joined: Sat Sep 26, 2009 4:02 pm
Location: Sweden

Re: First mod(script) ~ very simple position saving and tele

Post by SteelRaven7 » Wed Oct 17, 2012 6:32 am

last wrote:I wonder if this code can be executed with a checkpoint? It would be really cool when it does so we can place some autosave checkpoints onto parkour maps.
Yes, this should be possible!

Hg341
Posts: 94
Joined: Mon Oct 08, 2012 9:35 pm

Re: First mod(script) ~ very simple position saving and tele

Post by Hg341 » Wed Oct 17, 2012 9:44 pm

SteelRaven7 wrote:Yes, this should be possible!

it should be but i cant get something as simple as a hotspot that executes "SaveQs();"

User avatar
CryptoSeven
Posts: 99
Joined: Sun Aug 19, 2012 1:42 pm

Re: QuickSaveMod Now With HotSpots! ~ by Hg341

Post by CryptoSeven » Sun Oct 21, 2012 1:19 pm

Works like a charm. Fun to see this growing out of that first simple teleporting.

Hg341
Posts: 94
Joined: Mon Oct 08, 2012 9:35 pm

Re: QuickSaveMod Now With HotSpots! ~ by Hg341

Post by Hg341 » Mon Oct 22, 2012 6:16 pm

CryptoSeven wrote:Works like a charm. Fun to see this growing out of that first simple teleporting.

is there anything you would like to see me add? im working on AI goal states/item states

Post Reply