All I want to do is make the high score list read a little better. I'd be happy just having it say "so and so died in The Trollmire, killed by Ce'Nelaith the rattlesnake. It'd be better if it would just say that for named monsters and for regular monsters say "killed by a skeleton mage/ an army ant" but that's splitting hairs.
From what I've seen it should just be a simple edit to mod/init.lua but I just can't get it too work. Well that's not quite right, I did get it to work once by editing the tome.team file directly but doing so again stops me from picking anything when I start a new game.
I know this is a stupid complaint but If I'm going to die as often as I do I'd like my record of failure to read nicely.
Simple Request?
Moderator: Moderator
-
- Sher'Tul Godslayer
- Posts: 2000
- Joined: Fri May 07, 2004 8:26 pm
- Location: Nahgharash
Re: Simple Request?
If you got it working once, there's no reason you shouldn't be able to get it working as an addon.
How far into making it an addon did you get before you gave up? It's entirely possible we can help you fix it up.
How far into making it an addon did you get before you gave up? It's entirely possible we can help you fix it up.
Currently playing under the name Aura of the Dawn 4 down, 227 to go!
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.
Re: Simple Request?
I'm not a coder in any way, shape or form but I thought I'd give this a go because it seemed so simple.Crim, The Red Thunder wrote:If you got it working once, there's no reason you shouldn't be able to get it working as an addon.
How far into making it an addon did you get before you gave up? It's entirely possible we can help you fix it up.
From what I could see I only needed to change two lines in the mod/init.lua file by making a folder containing a copy of the file with my changes and arranged like this tome-test/overload/mod/init.lua.
Code: Select all
score_formatters = {
["Maj'Eyal"] = {
alive="#LIGHT_GREEN#{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# is still alive and well on #GREEN#{where}#LAST##WHITE#",
dead="{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# died on #GREEN#{where}#LAST#, killed by a #RED#{killedby}#LAST#"
to
score_formatters = {
["Maj'Eyal"] = {
alive="#LIGHT_GREEN#{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# is still alive and well in the #GREEN#{where}#LAST##WHITE#",
dead="{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# died in the #GREEN#{where}#LAST#, killed by #RED#{killedby}#LAST#"
I just don't see why it doesn't work, do I need use hooks or is init.lua a difficult file to change or something? At this point I'm just so frustrated that something so seemingly simple has beaten me. Thanks for replying Crim.

Re: Simple Request?
I'm not sure it is safe to modify init.lua.
But we still don't have enough info to see what has gone wrong.
In what way does it not work?
Does it do nothing, or refuse to load or what?
But we still don't have enough info to see what has gone wrong.
In what way does it not work?
Does it do nothing, or refuse to load or what?
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Simple Request?
It does nothing. Sorry I should have put that in the first post.
I've done a little test and I think you might be right about the init.lua file. I changed nothing about my mod except for adding a mod/class/actor.lua file with a change to give 30 skill points of level up. That change worked perfectly.
Looks like it's just ignoring my changes to the high score list.
I've done a little test and I think you might be right about the init.lua file. I changed nothing about my mod except for adding a mod/class/actor.lua file with a change to give 30 skill points of level up. That change worked perfectly.

Looks like it's just ignoring my changes to the high score list.
Re: Simple Request?
I'll have a look when I get home to see where the score_formatters table is stored.
If I can find it, I can give you some code to edit it via the load hook.
If I can find it, I can give you some code to edit it via the load hook.
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Simple Request?
Instead of the overload, try putting this code into your-mod/hooks/load.lua:
Code: Select all
class:bindHook("ToME:load", function(self, data)
game.__mod_info.score_formatters.["Maj'Eyal"] = {
alive="#LIGHT_GREEN#{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# is still alive and well in the #GREEN#{where}#LAST##WHITE#",
dead="{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# died in the #GREEN#{where}#LAST#, killed by #RED#{killedby}#LAST#"
}
end)
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Simple Request?
Sorry I haven't replied to this HousePet, work's been crazy the past few days. I'll give this a go and report my findings.HousePet wrote:Instead of the overload, try putting this code into your-mod/hooks/load.lua:Code: Select all
class:bindHook("ToME:load", function(self, data) game.__mod_info.score_formatters.["Maj'Eyal"] = { alive="#LIGHT_GREEN#{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# is still alive and well in the #GREEN#{where}#LAST##WHITE#", dead="{score} : #BLUE#{name}#LAST# the #LIGHT_RED#level {level} {subrace} {subclass}#LAST# died in the #GREEN#{where}#LAST#, killed by #RED#{killedby}#LAST#" } end)