Adding Files to an Existing Module
Posted: Fri Oct 07, 2011 10:05 pm
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?:
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?
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})
},
}