Time to update guides and wiki

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Message
Author
jotwebe
Uruivellas
Posts: 725
Joined: Fri Apr 15, 2011 6:58 am
Location: GMT+1

Re: Time to update guides and wiki

#31 Post by jotwebe »

More class talent tables:

Done: Arcane Blade, Anorithil, Alchemist, Archer, Archmage, Berserker, Bulwark, Cursed, Marauder, Paradox Mage, Sun Pally, Temporal Warden
Stubs: Brawler, Corruptor, Doomed, Mindslayer, Necro, Oozemancer, Reaver, Rogue, SB, Solipsist, Summoner, SW, Wyrmic

Working on:
Ghoul never existed, this never happened!

Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

Re: Time to update guides and wiki

#32 Post by Castler »

jotwebe wrote: So showing example values is actually easier than the raw formulas? That's strange.
To show example values, my script loads a lot of the engine and simply executes each talent's info function. This is basically the same thing ToME does when it displays tooltips and is pretty straightforward.

To show formulas, I think that I would have to try and parse the talents' Lua code myself. This seemed much harder.
jotwebe wrote:That's pretty neat, imho. Don't know enough on whether the wiki can handle it - just make a test page and try it out?
I tried, and I couldn't see a way to make it work. I'm not super experienced with MediaWiki, though. Who handles administration of the wiki?
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Time to update guides and wiki

#33 Post by greycat »

Castler wrote: To show formulas, I think that I would have to try and parse the talents' Lua code myself. This seemed much harder.
Aye. All past attempts to quantify the talents have failed. The closest we've ever managed to come was to invent our own shorthand notation (basically written as a function call with 2-3 variables) and stick that into the documentation. Then the user would have to go look up what the notation meant and perform the substitutions and arithmetic by hand.

If anyone can go into that Lua source and come up with a simple human-readable description of how they work, that person will be revered as a demigod. I'm fairly convinced, at this point, that it's beyond my ability to do it.

Here's an example: Shield Pummel. In the current wiki this has "Hits the target with two shield strikes, doing (100-170)% and (120-210)% shield damage." Where did the ranges come from? What do they mean? If I have effective Shield Pummel talent level X, Strength Y, and effective Shield Expertise talent level Z, what would the numbers be? Do my shield's stats matter? What about physical power? Accuracy?

In the source code, the first number is

Code: Select all

100 * self:combatTalentWeaponDamage(t, 1, 1.7, self:getTself:getTalentLevel(self.T_SHIELD_EXPERTISE))
and the second number is

Code: Select all

100 * self:combatTalentWeaponDamage(t, 1.2, 2.1, self:getTalentLevel(self.T_SHIELD_EXPERTISE))
Well, there's the 1, 1.7, 1.2 and 2.1, but what do they mean? It looks like Shield Expertise matters... somehow? So then you have to track down the combatTalentWeaponDamage function, which is waaaay over in class/interface/Combat.lua and looks like

Code: Select all

function _M:combatTalentWeaponDamage(t, base, max, t2)
        if t2 then t2 = t2 / 2 else t2 = 0 end
        local diff = max - base
        local mult = base + diff * math.sqrt((self:getTalentLevel(t) + t2) / 5)
--      print("[TALENT WEAPON MULT]", self:getTalentLevel(t), base, max, t2, mult)
        return mult
end
Then you have to track down getTalentLevel which is even HIGHER up the hierarchy, all the way outside of the ToME module, u p in engines/default/engine/interface/ActorTalents.lua

Code: Select all

function _M:getTalentLevel(id)
        local t

        if type(id) == "table" then
                t, id = id, id.id
        else
                t = _M.talents_def[id]
        end
        return (self:getTalentLevelRaw(id)) * ((self.talents_types_mastery[t.type[1]] or 0) + 1)
end
And this is one of the simpler talents! Or maybe they've all been simplified since last year, I dunno. I haven't been following the development. I probably picked a bad example here if I was trying to show you how impossible the code is to understand....

Xandor Tik'Roth
Keeper
Posts: 1546
Joined: Tue Aug 12, 2003 3:08 pm
Location: The edge of the Abyss

Re: Time to update guides and wiki

#34 Post by Xandor Tik'Roth »

*Twitch*

Good Lord... That gave me a headache...
And it was such a good idea...

Peony
Wayist
Posts: 21
Joined: Mon Jan 06, 2014 11:22 am

Re: Time to update guides and wiki

#35 Post by Peony »

greycat wrote:If anyone can go into that Lua source and come up with a simple human-readable description of how they work, that person will be revered as a demigod. I'm fairly convinced, at this point, that it's beyond my ability to do it.
Eh, it doesn't look that hard to get a decent approximation. The following is from a quick look at a couple of talents and what looks like the fairly generic functions behind them. I assume this covers most talents, but don't know which ones. I'm also assuming that the code isn't purposefully obfuscated and something like self:getTalentLevel(t) will get the level of the talent concerned.

A combat talent has two properties: a "base" value (damage done at level 1 and 0 power) and "max" value (damage at level 5 with 100 power). The latter is irrelevant except for calculating the far more important modifier, which is

Code: Select all

max / ((base + 100) * ((sqrt 5 - 1) * 0.8 + 1)
whcih looks rather complicated until you realise the last bit is basically just 2, giving

Code: Select all

max / (2 * base + 200)
which isn't too horrible.

After that we have to deal with talent level scaling. This is given by

Code: Select all

(sqrt level - 1) * 0.8 + 1)
for which it's easiest just to give the common values. For a mastery of 1.0 those are roughly

Code: Select all

1, 1.33, 1.6, 1.8, 2
and for mastery 1.3

Code: Select all

1.1, 1.5, 1.8, 2, 2.25.
Next we put those together. Fortunately that's just

Code: Select all

damage = (base + power * talent_multiplier * level_multiplier) ^ 1.04
which would be really simple if not for that exponential.

Was that sufficiently clear? Is it at all helpful? Is it worth me looking at the other functions like weapon damage multipliers? Or trying to quantify how many skills actually use these functions?

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Time to update guides and wiki

#36 Post by greycat »

I haven't the slightest clue how you got from this code:

Code: Select all

function _M:combatTalentWeaponDamage(t, base, max, t2)
        if t2 then t2 = t2 / 2 else t2 = 0 end
        local diff = max - base
        local mult = base + diff * math.sqrt((self:getTalentLevel(t) + t2) / 5)
--      print("[TALENT WEAPON MULT]", self:getTalentLevel(t), base, max, t2, mult)
        return mult
end
to this formula:
Peony wrote:

Code: Select all

max / ((base + 100) * ((sqrt 5 - 1) * 0.8 + 1)
Maybe I need to choose a different example. Perhaps talents that aren't Shield Pummel work differently?
Was that sufficiently clear? Is it at all helpful?
You've got 4 equations and 1 table, but nothing that can be written in the "This is what the talent does" box, as far as I can see. Of course, nobody else has managed that yet, either.

Peony
Wayist
Posts: 21
Joined: Mon Jan 06, 2014 11:22 am

Re: Time to update guides and wiki

#37 Post by Peony »

greycat wrote:I haven't the slightest clue how you got from [X to Y]
Perhaps it wasn't clear: I looked at a bunch of simple direct damage talents. This did not include those based on weapon damage like shield pummel. I suspect it covers most spells and spell-like things.
greycat wrote:You've got 4 equations and 1 table, but nothing that can be written in the "This is what the talent does" box, as far as I can see. Of course, nobody else has managed that yet, either.
Strictly speaking three of those are expressions. And they're only there because I tried to show some of my working. Perhaps I didn't show enough.

The simple things you can put on a wiki are the base damage and multiplier. Those are the only things specific to the skill. Presumably the point is to compare skills to one another, which that should manage. The actual formula and table of talent level multipliers is the same for all talents of this kind.

Mewtarthio
Uruivellas
Posts: 717
Joined: Mon Jul 16, 2012 6:03 pm

Re: Time to update guides and wiki

#38 Post by Mewtarthio »

Peony wrote:
greycat wrote:I haven't the slightest clue how you got from [X to Y]
Perhaps it wasn't clear: I looked at a bunch of simple direct damage talents. This did not include those based on weapon damage like shield pummel. I suspect it covers most spells and spell-like things.
That formula's from combatTalentMindDamage and combatTalentSpellDamage.

Anyway, it's relatively simple to give the inputs to the formulas (combatTalentWeaponDamage requires the value at TL 0 and the value at TL 5, where Shield Expertise boosts effective talent level by half its own value; combatTalentSpellDamage requires the value at power 0 and the value at TL 5/power 100), but a bit trickier to show how the talent level and power are used to calculate the final value.

What sort of scripting does the wiki allow? The most transparent option, in my opinion, would to include the function call and have it link to a calculator form pre-populated with the function's parameters (ie base and max), so the reader could enter talent level and power and see for themselves how the output changes.

vaughner
Yeek
Posts: 14
Joined: Sun Feb 02, 2014 4:55 pm
Location: Houston, TX, USA

Re: Time to update guides and wiki

#39 Post by vaughner »

Um... wow is really all I can say looking at this thread. There is a lot of work here and I think I know how I can help.

TL;DR -> Check out this project management system that is free, we need to organize if we want to make any progress, I'm new so don't bash me for trying to help in my own way. :D

So pretty much no one here knows who I am as I just joined the community less than a week ago. I have played ToME before but didn't have the time to get into it and it went by the wayside. I have recently gotten back into it when I saw it on Steam and I am loving the experience. Enough about that.

What we really need here is a project management system in place to handle who is doing what, what there is to do, what has already been done, etc. There are various tools for accomplishing this goal but my favorite in recent weeks is Trello. It is a wonderful web-based app for simple project management that does not require you to go into all the details that Microsoft Project does. (Costs, hours, workdays, etc.) We simply create 'cards' for tasks and follow them through to completion. We can set it up so anyone can view the board and see the progress and vote on what bothers them the most thereby prioritizing the project, or we can make it private and only invited persons can see the cards.

I have already ripped into the code for ToME and see the importance of not duplicating work and most people do not understand how little will get done if you don't know if someone is working on something or not.

I have setup the basic system for us to get started with this. Just click on the 'cards' to see more detail. It's populated with a few demo cards right now so everyone can see how it works. https://trello.com/b/Rw1w1TVr/te4-wiki-rework If you are interested, PM me the email address you want the account on and I will send you an invite from Trello. Also, if you want to see a Trello in action for game development, the devs of Rust use it and you can check that one out here -> https://trello.com/b/lG8jtz6v/rust-main

I love the idea of using a program/script to rip the data out of the Lua but either we give a flat standard way of representing the data or we have to provide a web based calculator to do it. What would be really nice (pipe dream I know) would be allow them to upload a character dump and then they could see exactly how things work out for them at that moment. If we try to provide everything to everyone we will never be able to do it. More important is standardizing the way data is represented so everyone has the same jumping off point for everything. Granted, I am not that familiar with the code base and the calculations to make this assertion at this point.

I hope you took the time to read this. I have managed quite a few projects in my life and have seen first hand how much of a difference organization can make with teams that are donating their time.

Edit: Also, Trello has free apps for iPhone/iPad, Android, and Windows 8 on top of the very nice web interface.

vaughner
Yeek
Posts: 14
Joined: Sun Feb 02, 2014 4:55 pm
Location: Houston, TX, USA

Re: Time to update guides and wiki

#40 Post by vaughner »

So I am working through all the Bosses right now, code diving to verify their stats and such.

I am really at a loss with what to do. For example, I am looking at Prox the Mighty at this point. http://te4.org/wiki/Prox_the_Mighty The info is correct but there are some things I am confused with and concerned about.

Firstly, the wiki page lists that Prox has 10 willpower but this is not in the code. Is this a stat that was removed from Prox in the last 7 months (since last edit) or was it just added to fill the space? It appears it was removed so my guess is the wiki should read 'N/A' for Willpower. The Sandworm Queen does have a Willpower stat listed in her code block.

Code: Select all

PROX     stats = { str=20, dex=10, cun=8, mag=10, con=20 },
Sandworm Queen  	stats = { str=25, dex=10, cun=8, mag=20, wil=20, con=20 },
Second, the 'blurb' section on the left is all spoilery and filled with stuff that probably should be on a secondary page. I would think this would be best organized as a 'main page' that has just the bare bones info, stats, abilities, and drops. IE: 'http://te4.org/wiki/Prox_the_Mighty'. Then there should be a page 'http://te4.org/wiki/Prox_the_Mighty_spoiler' that should contain all the other information. There should be opinions, strategies, etc here. Make it so you have to actually click a spoiler link to get to the spoiler information. Nothing else should link to the spoiler pages, only the main pages to prevent accidental spoiling. :roll:

And lastly, and this is likely an issue of semantics, but 'Prox's Lucky Halfling Foot' is listed as a 30% drop rate. I understand that resolvers.equip is to equip the actor on creation. So I will copy 5 lines of code from Prox and check my understanding for me please:

Code: Select all

	body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, TOOL=1 },
	resolvers.equip{ {type="weapon", subtype="greatmaul", autoreq=true}, },
	resolvers.equip{ {type="tool", subtype="misc", defined="LUCKY_FOOT", random_art_replace={chance=70}, autoreq=true}, },
	resolvers.drops{chance=100, nb=1, {unique=true, not_properties={"lore"}} },
	resolvers.drops{chance=100, nb=3, {tome_drops="boss"} },
So I see that he is created with 10 units of inventory space? He should have a mainland item, offhand item, armor item, and a tool? He should always have a greatmaul on him. He should always have 'LUCKY_FOOT' with a 70% chance to overwrite this item with a random artifact tool. And if I understand the resolvers.drops correctly, he should drop 4 items, 1 unique item that is NOT a lore drop, and 3 items from some random boss loot table that I can not find. I don't see anywhere that would indicate he should drop what he is carrying (resolvers.equip) when he dies. Maybe this in the T-Engine 4 code and I haven't see it. Where do I find this tome_drops=boss table? Based on these assumptions Prox should ALWAYS drop 6 items (greatmaul, either the Lucky Foot OR a Random Artifact, a unique item, and 3 boss drops).

Sorry for all the Walls of Text. Thanks everyone!

Mewtarthio
Uruivellas
Posts: 717
Joined: Mon Jul 16, 2012 6:03 pm

Re: Time to update guides and wiki

#41 Post by Mewtarthio »

The drop tables are from GameState.lua, starting at line 850.

As for Prox's inventory, he only equips what the resolvers say he equips. He always has a greatmaul equipped, but he's not guaranteed to drop it unless it's an artifact. He always has his Lucky Halfling Foot equipped, but there's a 70% chance it'll be replaced with a different artifact when he drops it. Upon his death, an artifact and three bits of boss-level loot are generated (he doesn't actually have them on his person) so he can "drop" them. Thus, your reward for killing Prox is two artifacts (with a 30% chance that one of them is the Lucky Foot) and three boss-level loot items. And maybe a greatmaul as well, but that's by no means guaranteed.

vaughner
Yeek
Posts: 14
Joined: Sun Feb 02, 2014 4:55 pm
Location: Houston, TX, USA

Re: Time to update guides and wiki

#42 Post by vaughner »

Excellent! Thanks for pointing me to GameState.lua. I don't know that I would have found those without some guidance.

And thanks for walking me through the code for Prox too. It seems a little confusing how loot gets generated and dropped but at the same time, it seems a more elegant solution than ones I have seen in the past. Really the only code I would like to look at now is the code that actually decides what he will or will not drop on death. Not sure where that would be located. Is there an IDE that can read all the module files and link up functions and calls? I've only been able to find ones that do the local file only and that makes LUA much more difficult to sort through than I would like. :/

Thanks again!

Xandor Tik'Roth
Keeper
Posts: 1546
Joined: Tue Aug 12, 2003 3:08 pm
Location: The edge of the Abyss

Re: Time to update guides and wiki

#43 Post by Xandor Tik'Roth »

Hey guys, it's been a while. Can I get a status update up in here?
And it was such a good idea...

Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

Re: Time to update guides and wiki

#44 Post by Castler »

I've made good headway with automatically generated spoilers, although I'm not sure if or how they should be integrated into the wiki.

Unfortunately, I don't have time to commit to systematically working on the wiki otherwise.
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

Post Reply