Addon Creator

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
Xavion
Yeek
Posts: 14
Joined: Sun Aug 19, 2012 9:22 am

Addon Creator

#1 Post by Xavion »

So I've started work on an addon creator for this game in because it sounds like something I could try. I've started with races to make sure I can do it but all it does so far is race types - no subraces - but I've started coding in subraces.

Here is a screenshot of what I've got so far.
Image

Currently it handles name, description, and runes/inscriptions. However it only handles those five so far. The file it generates with that is here.

Code: Select all

-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org

newBirthDescriptor{
	type = "race",
	name = "Construct",
	desc = {
     "An unatural being created with magic.",
     "The most common are golems, but they can vary greatly in shape and form.",
 },
 descriptor_choices =
 {
     subrace =
     {
         __ALL__ = "disallow",
     },
 },
 talents = {},
 copy = {
     faction = "allied-kingdoms",
     type = "humanoid", subtype = "human",
		resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=620}),
		resolvers.inscription("RUNE:_SHIELDING", {cooldown=14, dur=5, power=100}),
		resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10}),
		resolvers.inventory{ id=true, {defined="ORB_SCRYING"} },
		resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end),
	},
	random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 3}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, },
}

A question as well, is there any place I could find a list of all the different attributes things can have and what format they need to be in? also any suggestions would be greatly appreciated.

I can post the source if anyone cares, it's written in VB .NET using visual studio 2008.

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: Addon Creator

#2 Post by edge2054 »

The init table in actor.lua is a good place to start for actor attributes. It's by no means exhaustive though and there's no official list kept. Generally I grep before adding something to make sure I'm not using a name already taken.

After birth generally attributes are in a really simple format and you can use self:attr("foo", 2) to add two to a value or self:attr("foo", 2, true) to set a value too two. Things which are tables you can't set with the attr function (at least not easily) so you do something like this.

self.resists[DamageType.ACID] = (self.resists[DamageType.ACID] or 0) + 3

For stuff set at birth you can use the npc files as a good example on formating. For instance something you'd want to set with self:attr you can just set. Like..

invisible = 1, infravision = 5, etc. etc. in your copy field. (Yeeks are a good example race that does this).

Canderel
Sher'Tul
Posts: 1252
Joined: Mon Nov 24, 2003 2:31 pm
Location: South Africa

Re: Addon Creator

#3 Post by Canderel »

Cool, very cool. How big is the scope you are planning for it?

Xavion
Yeek
Posts: 14
Joined: Sun Aug 19, 2012 9:22 am

Re: Addon Creator

#4 Post by Xavion »

For the scope of what I want it do, as much as I can get it to do. Hopefully I can get it to make talents and classes but that's probably going to take a good bit of effort, particularly talents.

I've looked through the actors code for a bit and here's a list of attributes that I've gotten out, I stopped because everything seemed to have become skill specific or status effects.

Code: Select all

? = unsure of function/I guessed, A*array, B*boolean, S*string
stats per level       | stats_per_level
                      |
energy?               | energyBase
defense               | combat_def
armor                 | combat_armor
armor hardiness       | combat_armor_hardiness
attack?               | combat_atk
atmor peircing        | combat_apr
damage                | combat_dam
total speed?          | global_speed
base speed            | global_speed_base
bonus speed?          | global_speed_add
move speed?           | movement_speed
physical crit chance  | combat_physcrit
physical attack speed | combat_physspeed
spell attack speed    | combat_spellspeed
mental attack speed   | combat_mindspeed
spell crit chance     | combat_spellcrit
spellpower            | combat_spellpower
mindpower             | combat_mindpower
mental crit chance    | combat_mindcrit
                      |
physical save?        | combat_physresist
spell save?           | combat_spellresist
mental save?          | combat_mentalresist
                      |
fatigue               | fatigue
                      |
spell cooldown reduce | spell_cooldown_reduction
                      |
stat points           | unused_stats
class points          | unused_talents
generic points        | unused_generics
category points       | unused_talents_types
                      |
healing multiplier ?  | t.healing_factor
                      |
sight distance ?      | t.sight
                      |
A*your resource pools?| t.resource_pool_refs
                      |
light radius          | t.lite
                      |
*size category        | t.size_category
L*your rank           | t.rank
                      |
life per level        | t.life_rating
mana per level        | t.mana_rating
vim per level         | t.vim_rating
stamina per level     | t.stamina_rating
+/- per level         | t.positive_negative_rating
psi per level         | t.psi_rating
A*total multipliers   | t.inc_resource_multi
                      |
A*enemy sense ?       | t.esp
enemy sense range ?   | t.esp_range
                      |
A*cooldown reduction  | t.talent_cd_reduction
                      |
A*effects on hit      | t.on_melee_hit
A*project from melee? | t.melee_project
A*project from ranged?| t.ranged_project
A*special move rules? | t.can_pass
A*no idea?            | t.move_project
A*extra breathe rules?| t.can_breath
                      |
A* NPC's ai ?         | t.ai_tactic
                      |
-- Resistances        |
A*all resists         | t.resists
A*resist cap          | t.resists_cap
A*no idea             | t.resists_pen
A*enemy type resist?  | t.resists_actor_type
enemy type resist caps| t.resists_cap_actor_type
                      |
-- Absorbs a percentage of damage
A*Damage absorbs      | t.damage_affinity
                      |
-- % Increase damage
A*damage multiplier   | t.inc_damage
A*bonus to enemy      | t.inc_damage_actor_type
                      |
A*no idea?            | t.flat_damage_armor
A*damge cap?          | t.flat_damage_cap
                      |
-- Default regen
air regen             | t.air_regen
mana regen            | t.mana_regen
stamina regen         | t.stamina_regen
life regen            | t.life_regen
equilibrium regen     | t.equilibrium_regen
vim regen             | t.vim_regen
positive regen        | t.positive_regen
negative regen        | t.negative_regen
paradox regen         | t.paradox_regen
psi regen             | t.psi_regen
hate regen            | t.hate_regen
                      |
posive max            | t.max_positive
negative max          | t.max_negative
current positive      | t.positive
current negative      | t.negative
                      |
max hate              | t.max_hate
current hate          | t.hate
min for hate loss     | t.baseline_hate
total hate per kill   | t.hate_per_kill
base hate per kill    | t.default_hate_per_kill
                      |
current equilibrium   | t.equilibrium
                      |
current paradox       | t.paradox
                      |
current money         | t.money
                      |
A*no idea?            | turn_procs
                      |
A*combat stats        | combat
damage                | combat.dam
accuracy?             | combat.atk
armor peircing        | combat.apr
physical crit chance  | combat.physcrit
physical attack speed | physspeed
stat damage mults?    | dammod
max damage mult?      | damrange
S*weapon type?        | talented
                      |
A*your talents?       | talents
A*talent categories?  | talents_types
                      |
poison resist         | poison_immune
disease resist        | disease_immune
cut resist            | cut_immune
confusion resist      | confusion_immune
blind resist          | blind_immune
silence resist        | silence_immune
disarm resist         | disarm_immune
pin resist            | pin_immune
stun resist           | stun_immune
sleep resist          | sleep_immune
fear resist           | fear_immune
knockback resist      | knockback_immune
stone resist          | stone_immune
instakill resist      | instakill_immune
teleport resist       | teleport_immune
                      |
no idea?              | solipism_threshold
no idea?              | clarity_threshold
B*experiencing time   | no_timeflow
B*talents can cooldown| no_talents_cooldown
B*spells can work     | spell_failure
I'm either unsure or completely ignorant for everything with a question mark and I have no idea why some of them have the "t." so if you know anything it would be most useful, it should be more than enough for now though.

I've managed to find the list of runes and insripctions but I don't know how the "use_stat_mod" attribute affects them so that could be useful as well.

bricks
Sher'Tul
Posts: 1262
Joined: Mon Jun 13, 2011 4:10 pm

Re: Addon Creator

#5 Post by bricks »

Here are a few that I know, hope this helps:

Energy has to do with the turn-taking system; everyone gets 1000 by default, I think. Global speed can change this but I don't think you'd mess with energyBase directly.

combat_atk might be accuracy, same with combat.atk.

The various speed stats are exactly what they sound like, but I'm not certain what sort of values they use.

I think you are right on healing_factor, combat_***resist, and sight.

Esp/esp range are used by enemies that can see through (and often, move through) walls.

can_breath is probably used for drowning and suffocation.

I think flat_damage_armor and flat_damage_cap have to do with armor hardiness.

I think dammod is the stat scaling on weapons (i.e. 120% of strength).

solipsism_threshold and clarity_threshold are part of the newly introduced psionic subclass.

Pretty sure that use_stat_mod is for the 'egoed' inscriptions, which scale with a certain stat.

Classes should be easier than talents, although some things are always going to be tricky to code, like setting up the alchemist's golem. For talents, a tool like this could be handy to set up the standard talent properties, and leave room for the specific bits. I suppose you could write some logic for things like applying status effects and projecting certain attacks, but the effort probably wouldn't be commensurate with the outcome.
Sorry about all the parentheses (sometimes I like to clarify things).

phantomglider
Archmage
Posts: 372
Joined: Fri Jan 20, 2012 12:13 am

Re: Addon Creator

#6 Post by phantomglider »

The "t." is used because t is sometimes used as the name for an actor being passed to a function. I don't know why.

melee_project and ranged_project are extra damage when your attack lands, things like the mind damage on Projection weapons. on_melee_hit is damage when someone attacks you - spiked armor and Ice Armor and such.

can_pass is used for things like Xorns moving through walls.

move_project I'm not certain of, but I think it's used to leave effects laying around as an acotr walks, like oozing horrors' slime trails.

turn_procs is used to make sure things like Lifedrinker and the Volcanic Choker only proc once per turn, which is important because Anorithils can fire a million spells every turn.
<Ferret> The Spellblaze was like a nuclear disaster apparently: ammo became the "real" currency.

faustgeist
Halfling
Posts: 98
Joined: Wed Mar 02, 2011 6:59 pm

Re: Addon Creator

#7 Post by faustgeist »

Looking great!

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Addon Creator

#8 Post by lukep »

I have been working a bit on the talent side of addon creation, and I have a basic melee talent creator made in html/javascript. I currently have name, pre_use requirements, attack type (mainhand, offhand, etc), damage, resource cost, and cooldown as the parameters.

I'm planning on adding: status effects, apr/atk/crit/crit mod/damage type, multiple attacks (the same, or different), target type, and many flags like blind_fight and will_combat.

For now, I'm keeping myself to melee talents, but I might go to projected attacks, sustains, passives, and archery later.

Link (you can either use that page there, or else save it locally)
Link 2 (for looking at the code. You can also copy/paste it.)
Last edited by lukep on Mon Aug 27, 2012 5:09 am, edited 1 time in total.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Addon Creator

#9 Post by lukep »

I've made a lot more progress on the melee talent creator. Everything now processes as soon as the data is entered, so the "submit" button was removed. I also added Accuracy, APR, Crit rate, Crit mod, and Will combat to the changes you can make, and it is easy to add more.

Here's where it is as of tonight. I won't be altering this file any more, so you don't need to worry about it changing and breaking in the middle of something.
Link

EDIT: and that link is already obsolete. I have added Blind Fight and damage types to the development version, available in the previous post.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

Xavion
Yeek
Posts: 14
Joined: Sun Aug 19, 2012 9:22 am

Re: Addon Creator

#10 Post by Xavion »

I have an update!

Here is the very first version that should be able to create all the files needed for a working add on, not a very a good add on but it should work.

Also I redid the GUI because I needed something less annoying and easier to extend.
Image

It isn't completely idiot proofed yet and not everything works but it's about 99% functional for what's in there and it can act as an easy way of creating the basics of race files so here it is. Any suggestions would be appreciated.
Attachments
ToME Race Creator.exe.zip
(30.65 KiB) Downloaded 193 times

Planetus
Archmage
Posts: 346
Joined: Sat Jun 23, 2012 8:44 pm

Re: Addon Creator

#11 Post by Planetus »

That looks AWESOME, and I can't wait to play around with it, but when I try to run it Windows 7 64x says "The program has stopped working". Any advice? Does it need anything in the background?

Xavion
Yeek
Posts: 14
Joined: Sun Aug 19, 2012 9:22 am

Re: Addon Creator

#12 Post by Xavion »

Alright then two other versions, one is a complete copy of the debug build which should work so try that first and the other one is a n installer but I haven't tried that but it should work.
Attachments
Debug.zip
(66.15 KiB) Downloaded 260 times
Archive.zip
(239.86 KiB) Downloaded 223 times

Planetus
Archmage
Posts: 346
Joined: Sat Jun 23, 2012 8:44 pm

Re: Addon Creator

#13 Post by Planetus »

Ok, the debug didn't work at all for me, just the same message as the exe. The install came up with an error saying it needed Microsoft.VisualBasic.Powerpacks.Vs Version 9.0.0.0 in the Global Assembly Cache. I'm guessing this is needed for the exe, too. I was looking the issue up and came up with this: http://social.msdn.microsoft.com/Forums ... 4700ef0c92

I hope this helps.

Xavion
Yeek
Posts: 14
Joined: Sun Aug 19, 2012 9:22 am

Re: Addon Creator

#14 Post by Xavion »

I've tried what they said but it makes it too big for the forums so here is a mediafire link.

Planetus
Archmage
Posts: 346
Joined: Sat Jun 23, 2012 8:44 pm

Re: Addon Creator

#15 Post by Planetus »

That seems to work for me now. However, I can't find where the program installed to or where it saved files. The load button doesn't seem to do anything (doesn't bring up a menu of files to load, and doesn't auto-load anything). I don't know if this is because the save failed or the load button isn't functional yet, or even if it's a problem with the program or me not understanding something.

I can't wait for more features, though.

Post Reply