Resetting augs/notes/nanokeys when level changes

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
User avatar
FastGamerr
MJ12
Posts: 312
Joined: Sat Jul 10, 2010 10:06 am
Location: Finland
Contact:

Resetting augs/notes/nanokeys when level changes

Post by FastGamerr »

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?
Defaultplayer001
NSF
Posts: 81
Joined: Sat Nov 05, 2016 1:18 pm

Re: Resetting augs/notes/nanokeys when level changes

Post by Defaultplayer001 »

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.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Resetting augs/notes/nanokeys when level changes

Post by Cybernetic pig »

Add this to function PreTravel() in DeusExPlayer.uc or any subclasses of it.

Code: Select all

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: Select all

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

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

player.DeleteAllNotes();
player.DeleteAllGoals();
player.ResetConversationHistory();
john00
NSF
Posts: 50
Joined: Mon Mar 27, 2023 7:21 pm

Re: Resetting augs/notes/nanokeys when level changes

Post by john00 »

When shopping for a drilling machine, it’s important to consider your specific project and the types of materials you plan to work with. This will help you narrow down your choices and determine which type of machine is best for you. https://drillingguy.com/best-drill-bits-for-aluminum/
huntshaded
Mole Person
Posts: 3
Joined: Thu Oct 05, 2023 3:14 am

Re: Resetting augs/notes/nanokeys when level changes

Post by huntshaded »

It's crucial to think about your specific project and the kinds of materials you want to use when choosing a drilling machine. This will enable you to reduce your options and choose the best machine type for you.
gorilla tag
Post Reply