The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

Help with script (again)

General help and troubleshooting.
Post Reply
Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Help with script (again)

Post by Arkngt » Fri Jul 24, 2015 10:18 pm

I'm having an issue with my port of SD's Megaton House Trophies. You're supposed to get a trophy after killing 50 Feral Ghouls, but I never get it. In Fallout 3 it works perfectly. Here's the original script part:


if (GetDeadCount LvlFeralGhoul >= 50)

SDMFeralTrophyRef.Enable

endif


But it just doesn't work. I asked RoyBatty and he thought it might be because FNV/TTW adds challenges that rotates, so after killing 50 Feral ghouls the count is reset. So I changed the script to be like this instead:


if dooncedc

else

if (GetDeadCount LvlFeralGhoul >= 50)

SDMFeralTrophyRef.Enable

set dooncedc to 1

endif

endif


But that doesn't work either. Does anyone have an idea why this doesn't work with FNV/TTW?


 


»You're no match for science!« Doctor Mobius

Gribbleshnibit8
Posts: 481
Joined: Sun Nov 04, 2012 2:06 am

As with a whole lot of

Post by Gribbleshnibit8 » Sat Jul 25, 2015 1:52 pm

As with a whole lot of creature and loot lists, TTW makes a DC version of lists because the NV version is different from what existed in FO3. In this case creature form you want is LvlFeralGhoulDC. What you have there is looking for you to kill ghouls that exist in NV only. Actually you'd probably want to check for either creature type being killed, unless you only want DC ghouls to count of course.



Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Thanks! So

Post by Arkngt » Sat Jul 25, 2015 2:05 pm

Thanks! So


if dooncedc

else

if (GetDeadCount LvlFeralGhoul >= 50) || (GetDeadCount LvlFeralGhoulDC >= 50)

SDMFeralTrophyRef.Enable

set dooncedc to 1

endif

endif


should make it so that you get the trophy if you've killed 50 ones in either wasteland - and be a safeguard for the TTW challenge count reset. I'll try it.


EDIT: Seems that I shouldn't use the doonce thingy in this case as it doesn't work with that.


if (GetDeadCount LvlFeralGhoulDC >= 50) || (GetDeadCount LvlFeralGhoul >= 50)

SDMFeralTrophyRef.Enable

endif


works fine, though.


»You're no match for science!« Doctor Mobius

JaxFirehart
Posts: 3003
Joined: Wed Sep 12, 2012 12:33 am

if ((GetDeadCount

Post by JaxFirehart » Sat Jul 25, 2015 4:05 pm

if ((GetDeadCount LvlFeralGhoulDC + GetDeadCount LvlFeralGhoul) >= 50)

    SDMFeralTrophyRef.Enable

endif  


The way you had is saying you either have to kill 50 DC ghouls or 50 NV ghouls, the one above is saying that your combined DC/NV ghoul kill count needs to be above 50.



Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Thanks! I thought it could be

Post by Arkngt » Sat Jul 25, 2015 4:16 pm

Thanks! I thought it could be something like that, but I didn't dare to try it...


»You're no match for science!« Doctor Mobius

Gribbleshnibit8
Posts: 481
Joined: Sun Nov 04, 2012 2:06 am

set deadCount to GetDeadCount

Post by Gribbleshnibit8 » Sat Jul 25, 2015 4:20 pm


set deadCount to GetDeadCount LvlFeralGhoulDC + GetDeadCount LvlFeralGhoul
if (deadCount >= 50 && doOnce == 0)
set doOnce to 1
thing.enable
endif


Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Gribbleshnibit8 wrote:

Post by Arkngt » Sat Jul 25, 2015 4:39 pm

[quote=Gribbleshnibit8]



set deadCount to GetDeadCount LvlFeralGhoulDC + GetDeadCount LvlFeralGhoul
if (deadCount >= 50 && doOnce == 0)
set doOnce to 1
thing.enable
endif

[/quote]


That doesn't work for some reason, although it might very well be because I've butchered the script by now. Here's how it looks.


The problematic ones for me with TTW have been the Feral Ghoul, Yao Guai and Deathclaw trophies. My char must surely have killed more than enough of them by now. If changed to the above, I only get the Deathclaw trophy.


»You're no match for science!« Doctor Mobius

Gribbleshnibit8
Posts: 481
Joined: Sun Nov 04, 2012 2:06 am

You've only got one doOnce

Post by Gribbleshnibit8 » Sat Jul 25, 2015 5:22 pm

You've only got one doOnce variable in there. Whichever block sets it first will prevent any subsequent ones from running. You need a doOnceGhouls, doOnceYaoGuai, etc. in order for it to function correctly.



Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Yay, now it works perfectly!

Post by Arkngt » Sat Jul 25, 2015 6:03 pm

Yay, now it works perfectly! Thanks, Gribbleshnibit8 and JaxFirehart. :)


»You're no match for science!« Doctor Mobius

Post Reply