Adding Files to an Existing Module

If you have a module that you'd like comments on or would like to know how to create your very own module, post here

Moderator: Moderator

Post Reply
Message
Author
Aussiemon
Higher
Posts: 59
Joined: Sun Sep 18, 2011 12:23 am

Adding Files to an Existing Module

#1 Post by Aussiemon »

Okay now perhaps this is a stupid/obvious question, but... how does one add files to a module? I created a weapon (code below), but I can't figure out how to recompress or change the module without it breaking. I used WinRar's "add file to archive" functionality to place my weapon and png file in the ToME module, but it loads indefinitely when it reaches 100%.

Is there a special program needed to compress team files? I couldn't find anything in the wiki or forums, so that's why I'm assuming it must be an obvious/stupid question.

Or is there something wrong with the code I wrote, creating an error?:

Code: Select all

newEntity{ base = "BASE_LONGSWORD",
	power_source = {unknown=true},
	unique = true,
	name = "Nameless", color = colors.LIGHT_STEEL_BLUE, image = "object/artifact/weapon_nameless.png",
	unided_name = "muted blade",
	desc = [[This sword has no name. It does not exist in this dimension. You sense a subtle, yet terrible power from beyond when you wield it.]],
	level_range = {40, 50},
	rarity = 250,
	require = { stat = { str=60, mag=60 }, },
	cost = 750,
	material_level = 5,
	max_power = 50, power_regen = 2,
	use_talent = { id = Talents.T_WAVE_OF_POWER, level = 5, power = 40 }
	combat = {
		dam = 48,
		apr = 15,
		atk = 12,
		physcrit = 10,
		dammod = {str=1, mag=.2},
		melee_project={[DamageType.RANDOM_CONFUSION] = 14}
			},
	wielder = {
		esp = { horror = 1 },
		self.combat.special_on_hit = {desc="3% chance to return the target to a much youger state", fct=function(combat, who, target)
			if not rng.percent(3) then return end
			target:setEffect(target.EFF_TURN_BACK_THE_CLOCK, 3, {power=10}),
		self.combat.special_on_hit = {desc="3% chance to reduce the target's resistances to all damage", fct=function(combat, who, target)
			if not rng.percent(3) then return end
			target:setEffect(target.EFF_FLAWED_DESIGN, 3, {power=20})
	},
}
I'm assuming that with my familiarity with lua script, there is a very good chance of there being an error, but would that cause freezing in the module?

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Adding Files to an Existing Module

#2 Post by Grey »

Rename the team file to .zip, copy your data into the artifacts file in data/general/objects, then rezip and rename to .team before loading ToME4.

I'm not sure your special_on_hit really works though.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Aussiemon
Higher
Posts: 59
Joined: Sun Sep 18, 2011 12:23 am

Re: Adding Files to an Existing Module

#3 Post by Aussiemon »

I'll try that, thanks :)

Post Reply