www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Next Generation Level Editor

Reply
 
Thread Tools
Old 19-08-18, 20:29   #12961
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 31,407
Question

I'm using pickup-item2 as secret item.
My level has 6 of those secrets. The thing with pickup-items is that it does not show the amount in the inventory. It stays 1.
Since I've done so much editing with Meta2TR already that I do not want to risk having to do all that again, so I can't put the items in another slot.

Is there any way to show how many of the items are in the inventory?
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 19-08-18, 20:45   #12962
Krystian
Explorer
 
Join Date: May 2010
Posts: 843
Default

I believe that the amount of pickup-items is not incrementable, similarly how picking up many crowbar items does not ever increase the number of crowbars in inventory. The amount is always 1 at all times.

I'm afraid the best you can do at this point is make a secret counter that increments every time the pickup-item2 is picked up.
Alternatively if by any chance you have a spare unused puzzle item in the level wad, use that item to represent the number of secrets in inventory.
Krystian is offline   Reply With Quote
Old 19-08-18, 21:18   #12963
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 31,407
Default

I've cleaned up the wad before I started working with Meta2TR.

Oh well. The secret counter has been something that has crossed my mind.
Still not sure though if I want to use it though, because you can also see the number of secrets in the Statistics.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 20-08-18, 01:46   #12964
ChocolateFan
Hobbyist
 
ChocolateFan's Avatar
 
Join Date: Dec 2017
Location: I am female
Posts: 61
Default

This is one possible solution.

Prerequisites: AkyV_Mix01 plugin, six consecutive strings in the [Strings] section and the Last Input Number variable.

It is assumed that the secret is triggered only after picking up the secret item.

In the [Strings] section, place six consecutive strings like these:

Code:
Secret
2 x Secret
3 x Secret
4 x Secret
5 x Secret
6 x Secret
In the script, define some constants:

Code:
#DEFINE IDGT 1	; First free Global Trigger ID
#DEFINE IDTG 1	; First free Trigger Group ID
#DEFINE IDSW 1	; First free Switch ID
#DEFINE IDPR 1	; First free PARAM_INVENTORY_ITEM ID
#DEFINE IDST 33	; First string ID
The commands above are the only ones that need to be changed.

After that, a Global Trigger to run some Trigger Groups:

Code:
; Set Trigger Type - FLIPEFFECT 289
; Exporting: TRIGGER(1:0) for FLIPEFFECT(289) {Tomb_NextGeneration}
; <#> : Switch. Perform the <&>Switch script command
; <&> : Switch=     1
; (E) : 
; Values to add in script command: $2000, 289, $1

; Set Trigger Type - FLIPEFFECT 244
; Exporting: TRIGGER(19765:0) for FLIPEFFECT(244) {Tomb_NextGeneration}
; <#> : Variables. Memory. Copy to <&>Numeric Variable the (E)Savegame Memory value
; <&> : Last Input Number
; (E) : Statistics. Secrets (Byte)
; Values to add in script command: $2000, 244, $4D35

GlobalTrigger=	IDGT,IGNORE,GT_ALWAYS,IGNORE,IGNORE,IDTG,IGNORE
TriggerGroup=	IDTG,$2000,289,IDSW,$2000,244,$4D35
Switch=		IDSW,IGNORE,IGNORE,IDTG+1,IDTG+2,IDTG+3,IDTG+4,IDTG+5,IDTG+6
And finally, the main commands:

Code:
; Set Trigger Type - FLIPEFFECT 584
; Exporting: TRIGGER(24065:0) for FLIPEFFECT(584) {Plugin_AkyVMix01}
; <#> : Inventory-Item. Set <&> parameters for (E) inventory item 
; <&> : Parameters=PARAM_INVENTORY_ITEM,     1
; (E) : PICKUP_ITEM2
; WARNING:
; If you'll give this trigger to other people or you'll use it with a script.txt different than current
; you should add to the script, first of triggergroup where you'll use this trigger, the following line:
; #define @Plugin_AkyVMix01  2
; Values to add in script command: $022000, 584, $5E01

#DEFINE @Plugin_AkyVMix01 2
TriggerGroup=	IDTG+1,$022000,584,$5E00+IDPR
Parameters=	PARAM_INVENTORY_ITEM,IDPR,IDST,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+2,$022000,584,$5E00+IDPR+1
Parameters=	PARAM_INVENTORY_ITEM,IDPR+1,IDST+1,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+3,$022000,584,$5E00+IDPR+2
Parameters=	PARAM_INVENTORY_ITEM,IDPR+2,IDST+2,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+4,$022000,584,$5E00+IDPR+3
Parameters=	PARAM_INVENTORY_ITEM,IDPR+3,IDST+3,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+5,$022000,584,$5E00+IDPR+4
Parameters=	PARAM_INVENTORY_ITEM,IDPR+4,IDST+4,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+6,$022000,584,$5E00+IDPR+5
Parameters=	PARAM_INVENTORY_ITEM,IDPR+5,IDST+5,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
#DEFINE @plugins CLEAR
ChocolateFan is offline   Reply With Quote
Old 20-08-18, 14:17   #12965
dcw123
Relic Hunter
 
dcw123's Avatar
 
Join Date: Nov 2007
Location: England, UK Gender:Male
Posts: 6,176
Default

NVM sorry

Last edited by dcw123; 20-08-18 at 15:25.
dcw123 is offline   Reply With Quote
Old 20-08-18, 15:00   #12966
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 31,407
Default

Quote:
Originally Posted by ChocolateFan View Post
This is one possible solution.

Prerequisites: AkyV_Mix01 plugin, six consecutive strings in the [Strings] section and the Last Input Number variable.

It is assumed that the secret is triggered only after picking up the secret item.

In the [Strings] section, place six consecutive strings like these:

Code:
Secret
2 x Secret
3 x Secret
4 x Secret
5 x Secret
6 x Secret
In the script, define some constants:

Code:
#DEFINE IDGT 1	; First free Global Trigger ID
#DEFINE IDTG 1	; First free Trigger Group ID
#DEFINE IDSW 1	; First free Switch ID
#DEFINE IDPR 1	; First free PARAM_INVENTORY_ITEM ID
#DEFINE IDST 33	; First string ID
The commands above are the only ones that need to be changed.

After that, a Global Trigger to run some Trigger Groups:

Code:
; Set Trigger Type - FLIPEFFECT 289
; Exporting: TRIGGER(1:0) for FLIPEFFECT(289) {Tomb_NextGeneration}
; <#> : Switch. Perform the <&>Switch script command
; <&> : Switch=     1
; (E) : 
; Values to add in script command: $2000, 289, $1

; Set Trigger Type - FLIPEFFECT 244
; Exporting: TRIGGER(19765:0) for FLIPEFFECT(244) {Tomb_NextGeneration}
; <#> : Variables. Memory. Copy to <&>Numeric Variable the (E)Savegame Memory value
; <&> : Last Input Number
; (E) : Statistics. Secrets (Byte)
; Values to add in script command: $2000, 244, $4D35

GlobalTrigger=	IDGT,IGNORE,GT_ALWAYS,IGNORE,IGNORE,IDTG,IGNORE
TriggerGroup=	IDTG,$2000,289,IDSW,$2000,244,$4D35
Switch=		IDSW,IGNORE,IGNORE,IDTG+1,IDTG+2,IDTG+3,IDTG+4,IDTG+5,IDTG+6
And finally, the main commands:

Code:
; Set Trigger Type - FLIPEFFECT 584
; Exporting: TRIGGER(24065:0) for FLIPEFFECT(584) {Plugin_AkyVMix01}
; <#> : Inventory-Item. Set <&> parameters for (E) inventory item 
; <&> : Parameters=PARAM_INVENTORY_ITEM,     1
; (E) : PICKUP_ITEM2
; WARNING:
; If you'll give this trigger to other people or you'll use it with a script.txt different than current
; you should add to the script, first of triggergroup where you'll use this trigger, the following line:
; #define @Plugin_AkyVMix01  2
; Values to add in script command: $022000, 584, $5E01

#DEFINE @Plugin_AkyVMix01 2
TriggerGroup=	IDTG+1,$022000,584,$5E00+IDPR
Parameters=	PARAM_INVENTORY_ITEM,IDPR,IDST,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+2,$022000,584,$5E00+IDPR+1
Parameters=	PARAM_INVENTORY_ITEM,IDPR+1,IDST+1,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+3,$022000,584,$5E00+IDPR+2
Parameters=	PARAM_INVENTORY_ITEM,IDPR+2,IDST+2,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+4,$022000,584,$5E00+IDPR+3
Parameters=	PARAM_INVENTORY_ITEM,IDPR+3,IDST+3,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+5,$022000,584,$5E00+IDPR+4
Parameters=	PARAM_INVENTORY_ITEM,IDPR+4,IDST+4,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
TriggerGroup=	IDTG+6,$022000,584,$5E00+IDPR+5
Parameters=	PARAM_INVENTORY_ITEM,IDPR+5,IDST+5,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
#DEFINE @plugins CLEAR
What?
Okay, I need some time to study this.

Thanks for this setup. I'll give it a try.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 20-08-18 at 17:06.
Titak is offline   Reply With Quote
Old 20-08-18, 17:04   #12967
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 3,115
Default

I think we should add it as a tutorial:
TRNG - HOW TO COUNT UNCOUNTABLE ITEMS IN THE INVENTORY
AkyV is offline   Reply With Quote
Old 20-08-18, 17:07   #12968
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 31,407
Default

I'm about to give it a try and let you know how it is going.
And yes, this would be a nice tutorial!
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 20-08-18, 17:35   #12969
Mystery-King
Archaeologist
 
Join Date: Jul 2009
Location: Sunny ol' England where no other TRFer seems to be! :L
Posts: 2,017
Default

Me again, I'm stuck trying to sort out the setup for another puzzle and it's driving me mad!

So I have 3 different 8-click-high pushable (and able to be stood on top of) blocks that all need to be on their certain squares in order to open a door but I can't seem to work out the OCB setup. I'm following a couple of tutorials I found online for multiple pushable to open doors but I can't get it to work!

So far, I've selected the door and put a heavy switch on each of the 3 squares
(with the triggers having OCB of 1, 2, 3-4-5 respectively),
then on the 3 pushables right now they also have those OCBs selected but a couple of tutorials say I have to put a value in the box for it, but that then messes up the height that they are standable on.

Can anyone help?

EDIT: Right, I think I'm halfway there. The door now has OCB buttons 4 and 5 pressed and each pushable has one of the other 3 numbers pressed alongside the relevant heavytrigger. I'm now trying to make it that the door only stays open when all of them are on the right square and if you even move one of them off, the door closes.

EDIT 2: So all I'm trying to get working is the door only opens when all three pushables are on their correct squares at the same time.

Last edited by Mystery-King; 20-08-18 at 23:20.
Mystery-King is offline   Reply With Quote
Old 20-08-18, 17:45   #12970
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 31,407
Default

Quote:
Originally Posted by Titak View Post
I'm about to give it a try and let you know how it is going.
And yes, this would be a nice tutorial!
It is working like a charm!!!

I've never used #define so that got me confused for a bit, but taking it step by step, and reading a bit about #define in NG-Center, I learned that is was actually quite easy to get this to work.

Thanks, ChocolateFan!!!

Feel free to put this in the tutorials section.
The title AkV suggested sounds very good for it.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:14.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.