Code Search for Developers
 
 
  

core-docs.txt from POL-distro scripts at Krugle


Show core-docs.txt syntax highlighted

(Everything in this file is deleted as its contents are slurped up by
the doc-devel team)



Attributes
--------------
Attributes have a Base Value, ranging from 0 to 60000. If unmodified, this
will correspond to an Effective Value of 0.0 to 6000.0.

Each Attribute will have an Temporary Modifier value and an Intrinsic
Modifier.  Both of these are valued from 0 to 60000.

Intrinsic modifiers are meant to be generated from Attributes and perhaps
cprops (say, for race-based modifiers, not for spell modifiers).  They will
be recalculated (by a system hook) whenever any Attribute changes its Base
Effective Value.

Temporary Modifiers are the equivalent of today's strength_mod etc, and will
be managed entirely by script.  Intrinsic and Temporary modifiers will not
be saved with game state.

An Attribute's Effective Value is CInt((Base Value + Intrinsic Modifier +
Temporary Modifier) divided by 10).  Effective Values can 
thus range from 0 to 18000.

Vitals
--------
Vitals have a Maximum Value, Current Value, and Regen Rate.

Maximum Value range is from 0 to 1,000,000 (0.0 to 100,000.0)
Current Value range is from 0 to 1,000,000 (0.0 to 100,000.0)
  (internally these are both stored in hundredths of points)

Maximum Values and Regen Rates will be recalculated by a system hook
whenever an Attribute changes its Base Effective Value.

Regen Rate is defined as hundredths of points regenerated per 5 seconds - a
RegenRate of 100 will increase the Current Value by 1 (display) every 5
seconds.

Vital Regeneration occurs once every five seconds, when each 
Vital Current Value is increased according to its RegenRate.

Attribute Tests
--------------------
CheckSkill calls will be routed to a System Hook function.  No core
CheckSkill functionality will be provided.  The CheckSkill function must
determine success or failure as well as any appropriate Attribute gain.


New functions

// These are what most scripts should use to access Attributes and Vitals:
// All Attribute Names are case-insensitive.

// GetAttribute: returns Attribute's Effective Value (CInt(Base+Intrinsic+Temp)/10)
GetAttribute( mob, attrname ) : integer;

// GetVital:returns Vitals's Current Effective Value (Cint(Current/10))
GetVital( mob, vitalname ) : integer;



// these are what recalculation scripts, CheckSkill hooks etc will use
GetAttributeBaseValue( mob, attrname ) : integer;
GetAttributeTemporaryMod( mob, attrname ) : integer;
GetAttributeIntrinsicMod( mob, attrname ) : integer;

SetAttributeBaseValue( mob, attrname, basevalue );
SetAttributeTemporaryMod( mob, attrname, temporary_mod );
SetAttributeIntrinsicMod( mob, attrname, intrinsic_mod );

GetVitalMaximumValue( mob, vitalname ) : integer;
GetVitalCurrentValue( mob, vitalname ) : integer;
GetVitalRegenRate( mob, vitalname ) : integer;

SetVitalMaximumValue( mob, vitalname, value );
SetVitalCurrentValue( mob, vitalname, value );
SetVitalRegenRate( mob, vitalname, rate );


CONVERSION NOTES
================

GetSkill( mob, SKILLID_MINING )         -> GetAttribute( mob, "Mining" )
mob.strength                            -> GetAttribute( mob, "Strength" )
mob.strength_mod := 5                   -> SetAttributeTemporaryMod( mob, "Strength", 50 )

Note that any dealings with "Raw Skill" values should probably be rewritten entirely.
SetRawSkill( mob, SKILLID_ALCHEMY, rawpoints )  -> SetAttributeBaseValue( mob, "alchemy", RawSkillToBaseSkill(rawpoints) )
GetRawSkill( mob, SKILLID_ALCHEMY )             -> BaseSkillToRawSkill( GetAttributeBaseValue, "Alchemy" )



See more files for this project here

POL-distro scripts

The default distribution of scripts for the POL server project.

Project homepage: http://sourceforge.net/projects/pol-distro
Programming language(s): ASP,Pascal
License: other

  client/
    prof.txt
    readme.txt
  config/
    animxlate.cfg
    armrdesc.cfg
    armrzone.cfg
    bannedips.cfg
    boats.cfg
    bookstorage.cfg
    bowcraft.cfg
    circles.cfg
    cloths.cfg
    cmds.cfg
    colors.cfg
    combat.cfg
    console.cfg
    days.cfg
    equip.cfg
    equip2.cfg
    food.cfg
    golocs.cfg
    gzone.cfg
    innlocation.cfg
    insertsound.cfg
    itemdesc.cfg
    lootgroup.cfg
    menus.cfg
    movecost.cfg
    mrcspawn.cfg
    multis.cfg
    names.cfg
    nlootgroup.cfg
    npcdesc.cfg
    npcequip.cfg
    repsys.cfg
    servers.cfg
    servspecopt.cfg
    sets.cfg
    skills.cfg
    spawngroups.cfg
    spawnregions.cfg
    speechgroup.cfg
    spells.cfg
    stacking.cfg
    starteqp.cfg
    startloc.cfg
    teleporters.cfg
    use_stuff.cfg
    watch.cfg
    wepndesc.cfg
    xlate.cfg
  data/
    ds/
      spawnregion/
      sysbook/
        staticbooks.1.txt
    accounts.txt
    datastore.txt
    guilds.txt
    items.txt
    multis.txt
    npcequip.txt
    npcs.txt
    objects.txt
    pcequip.txt
    pcs.txt
    pol.txt
    resource.txt
    storage.txt
  dbghelp/
    dbghelp.dll
  devpkg/
    core95/
      ds1/
      ds2/
      pkginc/
      servperf/
      support/
      testscript/
      wwwdebug/
      wwwroot/
      pkg.cfg
    testfileaccess/
    testing/
      textcmd/
      floodthread.src
      pkg.cfg
  docs/
    basicem.html
    boatem.html
    builtintextcmds.html
    cfgfileem.html
    commands.txt
    configfiles.html
    datafileem.html
    escriptguide.html
    events.html
    fileem.html
    filenames.txt
    gumps.html
    httpem.html
    index.html
    mathem.html
    nodes.txt
    npcem.html
    objref.html
    osem.html
    performance.html
    picture_gump_finish_1.png
    polsysem.html
    privilages.html
    scripttypes.html
    unicodeem.html
    uoem.html
    utilem.html
  license/
    crypt/
  misc/
    world.dor.dat
  pkg/
    foundations/
    items/
    npcs/
    skills/
    systems/
    template/
    tools/
  regions/
    fish.cfg
    light.cfg
    ore.cfg
    regions.cfg
    resource.cfg
    weather.cfg
    wood.cfg
  scripts/
    ai/
    console/
    control/
    include/
    items/
    misc/
    textcmd/
    util/
    www/
    ECOMPILE.BAT
    NPCKeeper.src
    basic.em
    basicio.em
    boat.em
    boneControl.src
    cfgfile.em
    datafile.em
    devenv.bat
    doRes.src
    ecall.bat
    ecompile.cfg
    ecompile.cfg.example
    file.em
    http.em
    itemRes.src
    math.em
    npc.em
    os.em
    polsys.em
    start.src
    storageWipe.src
    unicode.em
    uo.em
    util.em
  bugs.txt
  changes.old
  core-changes-old.txt
  core-changes.txt
  core-docs.txt
  distro-changelog.txt
  grouped-core-changes095.txt
  howto-connect.txt
  pol.cfg
  readme.txt
  upgrade-notes-095.txt