Solved How to change object's display names

Question that is answered or resolved.

mulambo

Member
Hello, first post here and glad to see there's a community about OpenBOR. I'm still a noob at this and I know it's a small issue, I've been searching for other thread in the search page, but I've found none.
Basically, I'm using an existing pack to replace the graphics and the music with my own original ones but some things like the names of the objects must be changed (example: instead of a sandwich bonus whose display name is "Sandwich" I want to rename it "medikit" because the sprite resembles a medikit not a sandwich).
I've tried editing both the names in the models.txt and in the object's txt (called "bread.txt" but the Name field says "Sandwich") but the pak always crashes and OpenBOR closes automatically.
So, there's a way to change JUST the display name (the one that appears when you pick a bonus or destroy an object, right below the player's tab) ?

Thank you in advance
 
Did you try renaming that "sandwich" as "medikit" in your object txt file? Like this?

bread.txt:

Code:
name Medikit
health 80
type item

models.txt:
Code:
know Medikit data/chars/misc/bread.txt

That bread.txt is in your misc folder, right? Now I don't want to be condescending but I think you need to look at the entities' specific locations on where they're placed. Also look at the names respectively.

Do you have the name "medikit" in your level txt file (I don't mean levels.txt)?

Code:
spawn	box
item	medikit
coords	321 170
at	1600
 
mulambo said:
Hello, first post here and glad to see there's a community about OpenBOR. I'm still a noob at this and I know it's a small issue, I've been searching for other thread in the search page, but I've found none.
Basically, I'm using an existing pack to replace the graphics and the music with my own original ones but some things like the names of the objects must be changed (example: instead of a sandwich bonus whose display name is "Sandwich" I want to rename it "medikit" because the sprite resembles a medikit not a sandwich).
I've tried editing both the names in the models.txt and in the object's txt (called "bread.txt" but the Name field says "Sandwich") but the pak always crashes and OpenBOR closes automatically.
So, there's a way to change JUST the display name (the one that appears when you pick a bonus or destroy an object, right below the player's tab) ?

Thank you in advance

After a crash, check out the OpenBorLog.txt file in the logs folder. The last line will clue you in on what went wrong.

Anyway to answer your question, you could add script in your sandwich spawn animation:
anim spawn
@script
    void self = getlocalvar("self");

if (frame == 0){
changeentityproperty(self, "name", "MEDIKIT");
}
@end_script



 
thank you so much.
about first: yep, I tried renaming the respective txt files of the misc folder (using HFF proj as "template"), in models.txt and in stagex.txt (in levels folder) but it always crashed.
::edit::
yep, the log is showing now and I get where the error is, still got to find a simpler way to just edit the display name without touching the name of the declared model in stages.

I've tried the script too by adding it to each model txt (example on bread.txt) but the display name still looks the same.
 
I'm considering the option of disabling the item display and just leave the name of the characters. Is it possible? I'd leave the description of items in the how to frames..
... or as extreme option: is there anyone willing to cooperate and fix it once I get the "alpha version" done?
 
but the pak always crashes and OpenBOR closes automatically.

Just FYI, you don't need to pak the mod to test some changes. With blank pak, you can run a mod in its data folder form

I've tried the script too by adding it to each model txt (example on bread.txt) but the display name still looks the same.

I'm at lost here. Can you show bread.txt here and also screenshot showing player picking up the bread in level?
 
Bloodbane said:
Just FYI, you don't need to pak the mod to test some changes. With blank pak, you can run a mod in its data folder form
I tried moving the data folder to openbor main folder, but where do I put the blank pak / how and where to create it properly? Currently it only shows the paks (the previous pak file, and the original game I'm using as template)

Anyway, I've found the logs so I'll keep on following them and fix the names individually one by one so I think I can get it working... but if anyone knows how to not display the objects/bonuses as enemies please let me know
 
but where do I put the blank pak / how and where to create it properly?

In order to reduce confusion, try downloading this not-so-blank mod:
https://www.mediafire.com/?mdld5ez2778jdr9

You can run this mod without paking it first. This should give you idea on how to run a mod without paking

if anyone knows how to not display the objects/bonuses as enemies please let me know

Just set nolife 1 in their header text. Works for enemies too :)
 
Bloodbane said:
but where do I put the blank pak / how and where to create it properly?

In order to reduce confusion, try downloading this not-so-blank mod:
https://www.mediafire.com/?mdld5ez2778jdr9

You can run this mod without paking it first. This should give you idea on how to run a mod without paking

if anyone knows how to not display the objects/bonuses as enemies please let me know

Just set nolife 1 in their header text. Works for enemies too :)

I've tried the nolife 1 but it completely hides the object from screen, I needed just the name/energy bar to disappear.

the not-so-blank mod... I don't know, isn't it better to explain how to run a game without paking?
 
Back
Top Bottom