How do I set AR mods for the different ores?

For questions relating to POL scripting (not necessarily related to WoD)

Moderators: Siobhan, Sebastian, Drocket

How do I set AR mods for the different ores?

Postby nemirios on Mon Oct 28, 2002 5:23 am

i noticed in the WOD scripts, that regardless of what type of ingot is used, the AR of teh armor is the same. How do I change it so that the harder to get ores give better AR?
In normal POL i can do it, but not with these scripts. They are very different scripts it seems.
nemirios
Jr. Newbie
 
Posts: 3
Joined: Mon Oct 28, 2002 5:20 am
Location: Canada

hmm

Postby nemirios on Tue Oct 29, 2002 5:03 pm

I guess noone knows how :( ah well, i figured it out on POL, i'll figure it out on this one
nemirios
Jr. Newbie
 
Posts: 3
Joined: Mon Oct 28, 2002 5:20 am
Location: Canada

Postby Tel'Imoen on Wed Oct 30, 2002 5:25 am

Um... this is POL. Scripting is the same, just some scripts are different, the way you did it previously might actually work on WoD scripts.
Tel'Imoen
Jr. Oldbie
 
Posts: 214
Joined: Wed Oct 09, 2002 7:42 am

Postby ThE_GuN on Fri Nov 08, 2002 9:10 am

Should work with WoD scripts too... *looking*
ThE_GuN
Jr. Newbie
 
Posts: 2
Joined: Fri Nov 08, 2002 8:39 am

Postby ThE_GuN on Fri Nov 08, 2002 9:28 am

edit blacksmity.cfg
ThE_GuN
Jr. Newbie
 
Posts: 2
Joined: Fri Nov 08, 2002 8:39 am

Postby Kardall on Mon Jan 06, 2003 6:36 am

What I did, is figure out what kind of Ore was used to make the item, and read a config file which lists ar mods and dmg mods, that the ore will give when crafted into armor or weapon.

Go in the make_blacksmithy_items.src file in pol\pkg\skills\craftingskills\blacksmithy

look for the following code:

Code: Select all
//set the color
if (material.color)
  created_item.color := material.color;
endif


after that, and before the SubtractAmount(..... line, put the following:

Code: Select all
var bscfg := readconfigfile("ore");
var bselem := bscfg[material.objtype];
var armod := bselem.armod;
var dmgmod := bselem.dmgmod;

if(created_item.isa(POLCLASS_ARMOR))
  created_item.ar_mod := cint(armod);
elseif(created_item.isa(POLCLASS_WEAPON))
  created_item.dmg_mod := cint(dmgmod);
endif


Your cfg file should look like this (approx.):

Code: Select all
ore 0x6011 //iron ingot
{
armod 2
dmgmod 2
}
ore 0x6012 // bronze ingot
{
armod 3
dmgmod 3
}
...
...
...


format:

ore <ore objtype for that ore>
{
armod <value>
dmgmod <value>
}

and repeat for all. save as ore.cfg in the blacksmithy folder, and you'll be set.... adjust as needed...
Kardall
Newbie
 
Posts: 8
Joined: Mon Jan 06, 2003 6:27 am


Return to Scripting Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron