Reply To: Editing Cnut files (not for modding, just curiosity)

#23956
Avatar photoAdamMil
Participant

I gave it a try. There are multiple layers of DRM and deliberate corruption/ciphering of the CNUT files to make them hard to read; clearly the developers went out of their way to prevent people from reading the scripts. But after 8 or 9 hours I got it. Here’s the content of that knife.cnut file you mentioned:

[code]
this.knife <- this.inherit(“scripts/items/weapons/weapon”, {
m = {},
function create()
{
this.weapon.create();
this.m.ID = “weapon.knife”;
this.m.Name = “Knife”;
this.m.Description = “A short knife, not made for combat.”;
this.m.Categories = “Dagger, One-Handed”;
this.m.IconLarge = “weapons/melee/knife_01.png”;
this.m.Icon = “weapons/melee/knife_01_70x70.png”;
this.m.SlotType = this.Const.ItemSlot.Mainhand;
this.m.ItemType = this.Const.Items.ItemType.Weapon | this.Const.Items.ItemType.MeleeWeapon | this.Const.Items.ItemType.OneHanded;
this.m.IsDoubleGrippable = true;
this.m.AddGenericSkill = true;
this.m.ShowQuiver = false;
this.m.ShowArmamentIcon = true;
this.m.ArmamentIcon = “icon_knife_01”;
this.m.Value = 30;
this.m.Condition = 32.00000000;
this.m.ConditionMax = 32.00000000;
this.m.RegularDamage = 15;
this.m.RegularDamageMax = 25;
this.m.ArmorDamageMult = 0.50000000;
this.m.DirectDamageMult = 0.20000000;
}

function onEquip()
{
this.weapon.onEquip();
this.addSkill(this.new(“scripts/skills/actives/stab”));
this.addSkill(this.new(“scripts/skills/actives/puncture”));
}

function onUpdateProperties( _properties )
{
this.weapon.onUpdateProperties(_properties);
}

});
[/code]

I peeked at a bunch of other files, too. Interesting stuff there. It’s possible to figure out the most efficient backgrounds to hire now since you can read the stats directly out of the scripts…