www.tombraiderforums.com

www.tombraiderforums.com (https://www.tombraiderforums.com/index.php)
-   Next Generation Level Editor (https://www.tombraiderforums.com/forumdisplay.php?f=40)
-   -   AkyV’s released plugins (https://www.tombraiderforums.com/showthread.php?t=219148)

adngel 13-11-21 12:33

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...)

AkyV 13-11-21 18:43

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.

adngel 15-11-21 19:15

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


AkyV 15-11-21 20:04

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.

adngel 15-11-21 20:19

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


AkyV 15-11-21 20:36

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

Try and report. :)

adngel 15-11-21 20:51

Quote:

Originally Posted by AkyV (Post 8331014)
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.

AkyV 15-11-21 22:01

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

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. :)

adngel 15-11-21 23:11

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. :p

/---/

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. @_@

AkyV 16-11-21 17:41

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



All times are GMT. The time now is 10:56.

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