It is currently Sat Jun 23, 2018 4:37 am




Post new topic Reply to topic  [ 3 posts ] 
Resetting augs/notes/nanokeys when level changes 
Author Message
UNATCO
User avatar

Joined: Sat Jul 10, 2010 10:06 am
Posts: 264
Location: Finland
Post Resetting augs/notes/nanokeys when level changes
Is there a quick way to achieve the goals in the thread title in a MissionScript? Resetting the inventory/skill levels is quite easy, but trying to cut&paste the code concerning resetting augs/notes/keys from DeusExPlayer etc. just didn't do the trick (with my non-existent programming skills, admittedly).

Of course, the easiest method for this would be to make a trigger that'd basically run "open AnotherLevel.dx" in the console, but while I do want to reset the inventory/skills/augs/notes/nanokeys, I don't want to reset the flags (so that the ones that have been marked to remain in the savegame's history forever would be left).

Any ideas?

_________________
Deus Ex: Nihilum


Tue Dec 12, 2017 9:02 pm
Profile WWW
NSF

Joined: Sat Nov 05, 2016 1:18 pm
Posts: 77
Post Re: Resetting augs/notes/nanokeys when level changes
I'd recommend asking on the OTP Discord! (https://discord.gg/ZxSpWHK)There's also the Revision (https://discord.gg/5pNtjXh), Deus Ex Multiplayer (https://discord.gg/qgqSDRa) GMDX discord (https://discord.gg/FfqNWSj), and the UNATCO DX server (https://discord.gg/syg8q8Y)

Yeah, there's a ton.


Thu Dec 14, 2017 5:40 am
Profile
Illuminati

Joined: Thu Mar 08, 2012 3:21 am
Posts: 2283
Post Re: Resetting augs/notes/nanokeys when level changes
Add this to function PreTravel() in DeusExPlayer.uc or any subclasses of it.

Code:
if (KeyRing != None)
   KeyRing.RemoveAllKeys();

if (AugmentationSystem != None)
   AugmentationSystem.ResetAugmentations();

DeleteAllNotes();
DeleteAllGoals();
ResetConversationHistory();


This is without testing anything myself. There may be minor adjustments needed.

You can also use MissionScript PreTravel() to do it, say if you want to selectively do the above only for certain levels. If you do add it to mission script instead you'll need pointers to the player, like so:

Code:
if (player.KeyRing != None)
   player.KeyRing.RemoveAllKeys();

if (player.AugmentationSystem != None)
   player.AugmentationSystem.ResetAugmentations();

player.DeleteAllNotes();
player.DeleteAllGoals();
player.ResetConversationHistory();

_________________
GMDX: Advancement Mod


Thu Dec 14, 2017 11:24 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forum/DivisionCore.