www.tombraiderforums.com  

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

Reply
 
Thread Tools
Old 13-11-21, 11:33   #131
adngel
Historian
 
adngel's Avatar
 
Join Date: Jan 2004
Location: Surrey
Posts: 275
Default

I had a problem with dissapearing bars, but it resulted to be a mistake with parameters that were being used in another script.

However during the problem I was thinking about the memory, is the plugin using any of the NGLE memory variables? (Local Alfa 1, Current Values, etc...)
__________________
Living and Left :)

Last edited by adngel; 13-11-21 at 12:21.
adngel is online now   Reply With Quote
Old 13-11-21, 17:43   #132
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 4,624
Default

I am not at my PC, so I cannot check exactly, but the grip bar setup uses one of those variables - see the script description of the feature, I tell there which one.
AkyV is online now   Reply With Quote
Old 15-11-21, 18:15   #133
adngel
Historian
 
adngel's Avatar
 
Join Date: Jan 2004
Location: Surrey
Posts: 275
Default

I though I had solved the problem avoiding the parametters 1-10, but nop, my bars keep dissapearing.

The problem was that when I use the enemy health bar plugins, some bars dissapears.



I didn't know why, I though it was because I was using parametters 1-10 in my finance and animation code, later I found that parametters 1-10 shall be reserved for the PARAM_HEALTH_ENEMY to fit with the array. But after organizing my parameters and do more tests, I saw that didn't solve my problem.


I've been narrowing the problem to this trigger that I've got in my finance script.

$2000,203,$160A ;F203 Trigger: Prints the text NG line 10 using the Parametter Text 22
  • If I comment to don't print that line, the bars do not dissapear
  • If I change code to keep that line printed all the time, the bars simply do not appear at all.
  • If I change to print line 20 instead the line 10, the problem keep happening.
  • If I change to print usint Parametter Text id 16 instead of id 22 the problem keep happening.
  • If I put a duration time to the Parametter text to make the line disspear, the bar problem only happens while that text is printed in the screen.

For all that, I think that line is the culprit, but I don't really know why, or how to solve the issue. O_Ű

Finances.txt (summarized version).
Code:
;-----GLOBAL CONSTANTS
#DEFINE PMI_FIN_TEXT_HUD_GOLD 22
#DEFINE GT_FIN_DO_ALWAYS_DRAW_GOLD_HUD 2
#DEFINE TG_FIN_DO_DRAW_GOLD_HUD 4

;-----LOCALS CONSTANTS
#DEFINE X_GOLD_HUD_TEXT 150
#DEFINE Y_GOLD_HUD_TEXT 55

;-----Gold HUD Text----- (NG Line 10 = "GOLD #0010")

Parameters= PARAM_PRINT_TEXT, PMI_FIN_TEXT_HUD_GOLD,>
	CL_GOLD, FT_SIZE_HALF_CHAR,>
	IGNORE, IGNORE,>
	X_GOLD_HUD_TEXT, Y_GOLD_HUD_TEXT

GlobalTrigger= GT_FIN_DO_ALWAYS_DRAW_GOLD_HUD,>
	IGNORE, GT_ALWAYS, IGNORE,>
	IGNORE, TG_FIN_DO_DRAW_GOLD_HUD, IGNORE
	
TriggerGroup = TG_FIN_DO_DRAW_GOLD_HUD,>
	$2000,203,$1614 								;F203 Trigger: Prints the text NG line 10 using the Parametter Text 22
EnemyHealth.txt
Code:
TriggerGroup= 150, > ;Manual, needs to be placed in the level
$032000, 604, PHD_EHB_DISPLAY_BAR_COMMON ;To activate the bars with Display 1


;GLOBAL

#DEFINE PHD_EHB_DISPLAY_BAR_COMMON 51
#DEFINE PHD_EHB_DATA_BAR_COMMON 52
#DEFINE PHD_EHB_CHANGE_BAR_COMMON 53

;;-----BAR COMMON ENEMIES-----

Parameters= PARAM_HEALTH_DISPLAY, 51,>
	1, >						;Case ID
	PHD_EHB_DATA_BAR_COMMON,>	;Bar data
	IGNORE, IGNORE,>			;Text and Sprite
	0, 3, >						;Near Distance, Near Max
	1, 1,>						;First Display, Aim Near
	0,>							;Degrees
	IGNORE, IGNORE, IGNORE> ; Percentages color changes

Parameters=PARAM_HEALTH_BAR,>
	PHD_EHB_DATA_BAR_COMMON,>
	400, 50,>							;Target X,Y
	250, 25,>							;Target Width,Height
	250, 0, 16,>						;Target Inner RGB
	96, 0, 8,>							;Target Outer RGB
	400, 100,>							;Near X,Y
	50,>								;Near Y Offset.
	250, 25,>							;Near Width,Height
	16, 0, 250,>						;Near Inner RGB
	8, 0, 96,>							;Near Outer RGB
	PHD_EHB_CHANGE_BAR_COMMON 		;Bar Change

Parameters=PARAM_HEALTH_CHANGES, PHD_EHB_CHANGE_BAR_COMMON,>
	IGNORE, IGNORE, IGNORE,>
	IGNORE, IGNORE, IGNORE,>
	IGNORE, IGNORE, IGNORE,>
	IGNORE, IGNORE, IGNORE,>
	IGNORE


;-----ENEMIES DATA----- ŅPer level?

Customize= CUST_HEALTH_LEVEL, 3, BAT, SMALL_SCORPION, SCORPION, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE

Parameters=PARAM_HEALTH_ENEMY, 1,>
	PHD_EHB_DISPLAY_BAR_COMMON,>			;Bar Display
	BAT,>										;Enemy Slot
	IGNORE, 17,>								;Text
	IGNORE, IGNORE,>							;Target Sprites
	IGNORE, IGNORE,>							;Near Sprites
	IGNORE, IGNORE, IGNORE, IGNORE, IGNORE,>	;Exclussion Objects
	IGNORE, IGNORE

Parameters=PARAM_HEALTH_ENEMY, 2,>
	PHD_EHB_DISPLAY_BAR_COMMON,>
	SMALL_SCORPION,>
	IGNORE, 18,>
	IGNORE, IGNORE,>
	IGNORE, IGNORE,>
	IGNORE, IGNORE, IGNORE, IGNORE, IGNORE,>
	IGNORE, IGNORE

Parameters=PARAM_HEALTH_ENEMY, 3,>
	PHD_EHB_DISPLAY_BAR_COMMON,>
	SCORPION,>
	IGNORE, 19,>
	IGNORE, IGNORE,>
	IGNORE, IGNORE,>
	IGNORE, IGNORE, IGNORE, IGNORE, IGNORE,>
	IGNORE, IGNORE
__________________
Living and Left :)

Last edited by adngel; 15-11-21 at 18:21.
adngel is online now   Reply With Quote
Old 15-11-21, 19:04   #134
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 4,624
Default

Hello!
I admit that this is probably the most complicated setup I have done so far (or ever...), so perhaps we cannot solve it in only one step.
But I clearly see even at the first sight that a PARAM_HEALTH_CHANGES with full IGNORE is meaningless. Perhaps you want a changing setup (eg. a pulsing bar), but first I think it is better if you make it working as a constant setup.

So remove PARAM_HEALTH_CHANGES, and all the references to it (=IGNORE):
- Degrees, Percent1, Percent2, Percent3 fields of PARAM_HEALTH_DISPLAY,
- ExtraBar field of PARAM_HEALTH_BAR,
- ExtraText field of PARAM_HEALTH_TEXT,
- ExtraSprite field of PARAM_HEALTH_ENEMY.
AkyV is online now   Reply With Quote
Old 15-11-21, 19:19   #135
adngel
Historian
 
adngel's Avatar
 
Join Date: Jan 2004
Location: Surrey
Posts: 275
Default

I was trying to quit the PARAM_HEALTH_CHANGES but the game was crashing when I active the trigger, it was because I was not putting the "Degrees" value to IGNORE.

Now I could remove that feature, (yes I think I could use it on the future, but right now I was aiming to some small and simple till can deal with the dissapearing bars bug).

Code:
TriggerGroup= 150, > ;Manual, needs to be placed in the level
$032000, 604, PHD_EHB_DISPLAY_BAR_COMMON ;To activate the bars with Display 1


;GLOBAL

#DEFINE PHD_EHB_DISPLAY_BAR_COMMON 51
#DEFINE PHD_EHB_DATA_BAR_COMMON 52
#DEFINE PHD_EHB_CHANGE_BAR_COMMON 53

;;-----BAR COMMON ENEMIES-----

Parameters= PARAM_HEALTH_DISPLAY, PHD_EHB_DISPLAY_BAR_COMMON ,>
	1, >							;Case ID
	PHD_EHB_DATA_BAR_COMMON,>	;Bar data
	IGNORE, IGNORE,>				;Text and Sprite
	0, 3, >						;Near Distance, Near Max
	1, 1,>						;First Display, Aim Near
	IGNORE,>						;Degrees
	IGNORE, IGNORE, IGNORE> 		; Percentages color changes

Parameters=PARAM_HEALTH_BAR,>
	PHD_EHB_DATA_BAR_COMMON,>
	400, 50,>					;Target X,Y
	250, 25,>					;Target Width,Height
	250, 0, 16,>				;Target Inner RGB
	96, 0, 8,>					;Target Outer RGB
	400, 100,>				;Near X,Y
	50,>						;Near Y Offset.
	250, 25,>					;Near Width,Height
	16, 0, 250,>				;Near Inner RGB
	8, 0, 96,>					;Near Outer RGB
	IGNORE					;Bar Change



;-----ENEMIES DATA----- ŅPer level?

Customize= CUST_HEALTH_LEVEL, 1, SCORPION, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE

Parameters=PARAM_HEALTH_ENEMY, 1,>
	PHD_EHB_DISPLAY_BAR_COMMON ,>			;Bar Display
	SCORPION,>							;Enemy Slot
	IGNORE, 19,>							;Text
	IGNORE, IGNORE,>						;Target Sprites
	IGNORE, IGNORE,>						;Near Sprites
	IGNORE, IGNORE, IGNORE, IGNORE, IGNORE,>	;Exclussion Objects
	IGNORE, IGNORE
__________________
Living and Left :)

Last edited by adngel; 15-11-21 at 19:23.
adngel is online now   Reply With Quote
Old 15-11-21, 19:36   #136
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 4,624
Default

The next one:
Cust health level names only scorpion, but I saw other enemy types in the video as well.

Try and report.
AkyV is online now   Reply With Quote
Old 15-11-21, 19:51   #137
adngel
Historian
 
adngel's Avatar
 
Join Date: Jan 2004
Location: Surrey
Posts: 275
Default

Quote:
Originally Posted by AkyV View Post
The next one:
Cust health level names only scorpion, but I saw other enemy types in the video as well.

Try and report.
I've just removed them in this last code to make it easier and simple, the problem still happens only with 1 enemy.

The code of the video, is the one from the DISPLAY info example. Just change the enemies slot by the ones that appears in the video.
__________________
Living and Left :)
adngel is online now   Reply With Quote
Old 15-11-21, 21:01   #138
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 4,624
Default

(Sorry, I was away to see football World Cup qualifiers. )

The next one:

Quote:
Parameters=PARAM_HEALTH_ENEMY, 1,>
PHD_EHB_DISPLAY_BAR_COMMON ,> ;Bar Display
SCORPION,> ;Enemy Slot
IGNORE, 19,> ;Text
19 is a reference to a PARAM_HEALTH_TEXT which doesn't exist.

EDIT:
The last ">" is unnecessary:

Quote:
Parameters= PARAM_HEALTH_DISPLAY, PHD_EHB_DISPLAY_BAR_COMMON ,>
1, > ;Case ID
PHD_EHB_DATA_BAR_COMMON,> ;Bar data
IGNORE, IGNORE,> ;Text and Sprite
0, 3, > ;Near Distance, Near Max
1, 1,> ;First Display, Aim Near
IGNORE,> ;Degrees
IGNORE, IGNORE, IGNORE> ; Percentages color changes
EDIT2:
Perhaps these are not issues at all, but you don't need so big IDs.
I mean, the IDs of different PARAMs (per level) are independent from each other, feel free to count each from 1.

Quote:
#DEFINE PHD_EHB_DISPLAY_BAR_COMMON 51
#DEFINE PHD_EHB_DATA_BAR_COMMON 52
#DEFINE PHD_EHB_CHANGE_BAR_COMMON 53
EDIT3:
Let's call it a day, good night, tomorrow we can continue this discussion.

Last edited by AkyV; 15-11-21 at 21:54.
AkyV is online now   Reply With Quote
Old 15-11-21, 22:11   #139
adngel
Historian
 
adngel's Avatar
 
Join Date: Jan 2004
Location: Surrey
Posts: 275
Default

Yep, is a link to the NG line on the English.txt with the name of the monster, ("Spider" is in my case).

But still I wonder what would happen if I put on IGNORE and... well nothing different happens. As I was not using the Text, that value was also useless right now.

/---/

I forgot that bracket at the end, removed too.

/---/

At the moment I had put the >50 ID on the parameters to ensure they don't collide with the parameter from somewhere else. (The Enemy health script alone works fine, the problem was when I executed with my other scripts, that they also have their own parameters, for cameras, for orientation, for text formats, etc...)

The problem was still happening. So I've make more reductions. I commented all my INCLUDES, leaving only the main script.txt and the EnemyHealth.txt

I added a print line with parameter to the Enemy Health, and I still causes the problem.

Code:
TriggerGroup= 150, > ;Manual, needs to be placed in the level
$032000, 604, PHD_EHB_DISPLAY_BAR_COMMON ;To activate the bars with Display 1


;GLOBAL

#DEFINE PHD_EHB_DISPLAY_BAR_COMMON 51
#DEFINE PHD_EHB_DATA_BAR_COMMON 52
#DEFINE PHD_EHB_CHANGE_BAR_COMMON 53


;-----PRINT NG Line 10-----
GlobalTrigger= 20,>
	IGNORE, GT_ALWAYS, IGNORE,>
	IGNORE, 151, IGNORE

Parameters= PARAM_PRINT_TEXT, 25,>
	CL_RED, FT_SIZE_HALF_CHAR,>
	IGNORE, IGNORE,>
	150, 55

TriggerGroup = 151,>
	$2000,203,$1914 	;F203 Trigger: Prints the text NG line 10 using the Parametter Text 25




;-----BAR COMMON ENEMIES-----

Parameters= PARAM_HEALTH_DISPLAY, PHD_EHB_DISPLAY_BAR_COMMON,>
	1, >						;Case ID
	PHD_EHB_DATA_BAR_COMMON,>	;Bar data
	IGNORE, IGNORE,>			;Text and Sprite
	0, 3, >						;Near Distance, Near Max
	1, 1,>						;First Display, Aim Near
	IGNORE,>					;Degrees
	IGNORE, IGNORE, IGNORE		;Percentages color changes

Parameters=PARAM_HEALTH_BAR,>
	PHD_EHB_DATA_BAR_COMMON,>
	400, 50,>							;Target X,Y
	250, 25,>							;Target Width,Height
	250, 0, 16,>						;Target Inner RGB
	96, 0, 8,>							;Target Outer RGB
	400, 100,>							;Near X,Y
	50,>								;Near Y Offset.
	250, 25,>							;Near Width,Height
	16, 0, 250,>						;Near Inner RGB
	8, 0, 96,>							;Near Outer RGB
	IGNORE 		;Bar Change



;-----ENEMIES DATA----- ŅPer level?

Customize= CUST_HEALTH_LEVEL, 1, SCORPION, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE

Parameters=PARAM_HEALTH_ENEMY, 1,>
	PHD_EHB_DISPLAY_BAR_COMMON,>			;Bar Display
	SCORPION,>									;Enemy Slot
	IGNORE, IGNORE,>							;Text
	IGNORE, IGNORE,>							;Target Sprites
	IGNORE, IGNORE,>							;Near Sprites
	IGNORE, IGNORE, IGNORE, IGNORE, IGNORE,>	;Exclussion Objects
	IGNORE, IGNORE
Tomorrow I can try create a new project just to test that, to see if is the order of the plugins or if there is anything else conflicting in over there. @_@
__________________
Living and Left :)
adngel is online now   Reply With Quote
Old 16-11-21, 16:41   #140
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 4,624
Default

Hello!
I reconstructed your setup with very small differences:

1. I was lazy to add a scorpion to my test WAD, so tested with baddy_1 now.
2. My plugin ID is not 3 but 4 here.
3. I removed the part for PARAM_PRINT_TEXT printing, which is not part of PARAM_HEALTH_DISPLAY.

The setup was made for almost a full clear test script, so nothing interferes here.

I also placed one trigger for the baddy in the map, and another one (F118) for the TriggerGroup#150, and that's all.

And it worked nicely to me, with the newest Tomb Editor (1.4.5.). No disappearing.
I had two thin bars above each other. The constant "nearest enemy" one was blue, and the one above it for the actual aimed one was red.

Here:

Code:
TriggerGroup= 150, > ;Manual, needs to be placed in the level
$042000, 604, PHD_EHB_DISPLAY_BAR_COMMON ;To activate the bars with Display 1

;GLOBAL

#DEFINE PHD_EHB_DISPLAY_BAR_COMMON 51
#DEFINE PHD_EHB_DATA_BAR_COMMON 52
#DEFINE PHD_EHB_CHANGE_BAR_COMMON 53

;-----BAR COMMON ENEMIES-----

Parameters= PARAM_HEALTH_DISPLAY, PHD_EHB_DISPLAY_BAR_COMMON,>
	1, >						;Case ID
	PHD_EHB_DATA_BAR_COMMON,>	;Bar data
	IGNORE, IGNORE,>			;Text and Sprite
	0, 3, >						;Near Distance, Near Max
	1, 1,>						;First Display, Aim Near
	IGNORE,>					;Degrees
	IGNORE, IGNORE, IGNORE		;Percentages color changes

Parameters=PARAM_HEALTH_BAR,>
	PHD_EHB_DATA_BAR_COMMON,>
	400, 50,>							;Target X,Y
	250, 25,>							;Target Width,Height
	250, 0, 16,>						;Target Inner RGB
	96, 0, 8,>							;Target Outer RGB
	400, 100,>							;Near X,Y
	50,>								;Near Y Offset.
	250, 25,>							;Near Width,Height
	16, 0, 250,>						;Near Inner RGB
	8, 0, 96,>							;Near Outer RGB
	IGNORE 		;Bar Change



;-----ENEMIES DATA----- ŅPer level?

Customize= CUST_HEALTH_LEVEL, 1, BADDY_1, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE, IGNORE

Parameters=PARAM_HEALTH_ENEMY, 1,>
	PHD_EHB_DISPLAY_BAR_COMMON,>			;Bar Display
	BADDY_1,>									;Enemy Slot
	IGNORE, IGNORE,>							;Text
	IGNORE, IGNORE,>							;Target Sprites
	IGNORE, IGNORE,>							;Near Sprites
	IGNORE, IGNORE, IGNORE, IGNORE, IGNORE,>	;Exclussion Objects
	IGNORE, IGNORE

Last edited by AkyV; 16-11-21 at 16:42.
AkyV is online now   Reply With Quote
Reply

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 17:02.


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