Page 1 of 1

I wana make stuff too!

Posted: Wed Jan 05, 2011 1:22 am
by Sradac
What do I need to edit / create my own "stuff" for tome? notepad work or do I need a special lua editor? If I create something of my own will it need to be "compiled" or can I shoot it out as is?

I want to start learning to build in tome, talents and eventually make my elementalist if I can figure out how to create new dmg types or resource pools...or any of the other ideas i have for it. I know C, sort of. Yeah C not C## or C sharp, just C. But im intuitive, I can look at files and gather what means what most of the time.

Re: I wana make stuff too!

Posted: Wed Jan 05, 2011 1:31 am
by edge2054
Notepad++ is what I use on windows.

Lua is self compiling and very easy to make changes too. As long as you're not playing around in the engine you shouldn't need a compiler.

Also getting on IRC and asking questions can help a lot. :)

Re: I wana make stuff too!

Posted: Wed Jan 05, 2011 1:35 am
by Sradac
awesome, thanks edge

Re: I wana make stuff too!

Posted: Wed Jan 05, 2011 1:43 am
by Sradac
so. Lets say I want to make a new talent tree. Just to mess around with and get familiar with what variables do what. What files(s) would I need to start with? I know I would need to assign it to a class also.

Re: I wana make stuff too!

Posted: Wed Jan 05, 2011 1:52 am
by Aoi
tome\data\birth\classes\[whateverclass].lua to assign to a class
tome\data\talents.lua to load a tree
tome\data\talents\[treename]\[treename].lua to load branches
tome\data\talents\[treename]\[branchname].lua to load talents

Some talents also need other files, like:

tome\class\Actor.lua as Edge pointed out to me earlier.

Didn't list the full path, but should be easy enough to find. Also, the directories aren't hardcoded in , but it's good form to put them where all the others are.

Re: I wana make stuff too!

Posted: Wed Jan 05, 2011 4:01 am
by Sradac
how do I get on the IRC channel? Also, will this do what I think it will do?

Code: Select all

newTalent{
	name = "Plasma Shock"
	type = {"elemental/plasma",1},
	require = spells_req1,
	points = 5,
	random_ego = "attack",
	mana = 16,
	cooldown = 7,
	tactical = {
		ATTACK = 10,
	},
	range = 20,
	direct_hit = true,
	reflectable = true,
	requires_target = true,
	getDamage = function(self, t) return self:combatTalentSpellDamage(t, 50, 400) end,
	action = function(self, t)
		local tg = {type="hit", range=self:getTalentRange(t), talent=t}
		local x, y = self:getTarget(tg)
		if not x or not y then return nil end
		self:project(tg, x, y, DamageType.FIRE, self:spellCrit(t.getDamage(self, t)), {type="flame"})
		self:project(tg, x, y, DamageType.FIRE, self:spellCrit(t.getDamage(self, t)))
		game:playSoundNear(self, "talents/fire")
		return true
	end,
	info = function(self, t)
		local damage = t.getDamage(self, t)
		return ([[plasma shock, place holder]]):
		format(damDesc(self, DamageType.FIRE, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2))	end,
}
I want a "plasma" spell that works the same way freeze does, without the freeze effect. I copied the fire talent tree as I figured it would be a good place to start as any but im starting to think maybe I shouldnt have. Should I just start the .lua from scratch? Aiming for a talent that is high dmg, medium mana cost, medium cooldown. Also, would this split the damage in half between fire and physical?

Re: I wana make stuff too!

Posted: Wed Jan 05, 2011 4:09 am
by Final Master
Sradac wrote:how do I get on the IRC channel? Also, will this do what I think it will do?

Code: Select all

newTalent{
	name = "Plasma Shock"
	type = {"elemental/plasma",1},
	require = spells_req1,
	points = 5,
	random_ego = "attack",
	mana = 16,
	cooldown = 7,
	tactical = {
		ATTACK = 10,
	},
	range = 20,
	direct_hit = true,
	reflectable = true,
	requires_target = true,
	getDamage = function(self, t) return self:combatTalentSpellDamage(t, 50, 400) end,
	action = function(self, t)
		local tg = {type="hit", range=self:getTalentRange(t), talent=t}
		local x, y = self:getTarget(tg)
		if not x or not y then return nil end
		self:project(tg, x, y, DamageType.FIRE, self:spellCrit(t.getDamage(self, t)), {type="flame"})
		self:project(tg, x, y, DamageType.FIRE, self:spellCrit(t.getDamage(self, t)))
		game:playSoundNear(self, "talents/fire")
		return true
	end,
	info = function(self, t)
		local damage = t.getDamage(self, t)
		return ([[plasma shock, place holder]]):
		format(damDesc(self, DamageType.FIRE, damage/2), damDesc(self, DamageType.PHYSICAL, damage/2))	end,
}
I want a "plasma" spell that works the same way freeze does, without the freeze effect. I copied the fire talent tree as I figured it would be a good place to start as any but im starting to think maybe I shouldnt have. Should I just start the .lua from scratch? Aiming for a talent that is high dmg, medium mana cost, medium cooldown. Also, would this split the damage in half between fire and physical?
You'll need to remove the second row of

Code: Select all

self:project(tg, x, y, DamageType.FIRE, self:spellCrit(t.getDamage(self, t)))
and other than that to me it looks fine. You may want to move the physical damage down to a new row, and you need to remove the /2 from both of them as the talent won't display correctly.

OH, also, to get onto the IRC channel, you can download an IRC client, I recomend x-CHAT myself. From there, go to rizon server, connect, wait for it to connect - type /join #tome and bam, you are there with us.