- Joined
- Jun 16, 2007
- Messages
- 38
(Someone suggested to me on MSN that I should post this here. I originally posted this on TheHelper.net, if you'd like to read the post then go to this link: http://www.thehelper.net/forums/showthread.php?t=129003)
What is this?
Stemming from my Virtual Equipment system... I've created a framework for RPG makers. The goal is to make a set of systems and functions that are easy to use as well as maintaining complete modularity. I hate it when some really cool idea only works a single way, why not make it modular and allow it to work how I want it to?! This is my primary focus. This will also help alleviate many of the basic functions that RPG developers spend on their maps. Functions like save and loading can vex a map maker and they spend a while figuring out how this work, or not at all.
Everything in this map is available for map makers to use in their RPG projects. The other primary intent of this framework is to allow the map maker freedom to focus about innovative, interesting and fun concepts with their map and not about some of the tedious system in a map. If you plan to use all or part of this framework in your map you must not claim it to be your own work.
About the RPG Framework
It's been a while since I've put something up here and the last thing I did was my Virtual Equipment system which got tossed aside. That made me a bit angry and perhaps it wasn't something very many people could find useful in their maps. Well that gave me a bit more drive to do something extremely powerful and useful for the community here. I do know that StarCraft 2 has been announced but I still believe people will find this fun and useful, I will attempt to create something similar in StarEdit when the time comes.
Disclaimers
• This is not meant for use by novice map makers. This systems in this map are very easy, but there are some steps of implementation that basic map makers must know in order to use this system. Some basic knowledge is how to import other systems (Such as Multibars) and modifying RAW ID's based on your map's data.
• I am not responsible for making these systems work in your map! (Although I will help up to a point)
• I will not post the code from the map on the forums as there is too much to post
• The map is not perfect and I'm sure someone will notice little nuances like memory leaks
.
• Complexity is a huge issue for some of these systems and I will be optimizing them later
• Yes, I use Cohadar's ABC and I don't care if you think some struct system is better than another. I really don't care, talk about it elsewhere!
Changelog
Version 0.09:
• Fixed Unit Library HP and MP calculations - When a unit spawns it set a variable to the unit's current hitpoints as their base hitpoints (Say 1,000). When the unit levels and gets say 4 strength, that is 100 hp increase, it does not recalculate the unit's current base hitpoints. The unit now has 1,100 hp, the variable is still set to 1,000, so when you acquire an item that increases your hitpoints by 100, it uses the variable of 1,000 and adds 100 to that resulting in 100 or a net gain of 0 hitpoints when you should get 100. [Thanks to Dabum]
• Item System Multiboard uses Darthfett's Multiboard wrapper
• Hero Selection Multiboard uses Darthfett's Multiboard wrapper
Version 0.08:
• RPGFramework.j updated
• Fixed a fatal error with the Party System
• Hero Selection System added
• Fixed an error with the Save / Load system loading a hero's gear improperly
For older version see the full changelog
Known Bugs
• The random item drop system does not disallow for duplicate drops as the boolean in the setup may suggest
Future Improvements
• More features for the Party System (Healing by Icon on left side of the screen!)
• Improve Item System function call count
• Improve performance of SetUnitMaxState for larger values
• Add Critical Strike / Dodge / Block / Parry stats for items and create special system for handling those abilities
Requirements
•vJASS
•Grim Extension Pack Hotfix - Get it from my DropBox or from Wc3c.net (last post) - This is a must in order to get some of external functions working. The last post in that thread on wc3c contains the hotfix.
•A Brain!
Finished Systems / Libraries
• Advanced Player Library
• Advanced Hero Library
• Hero Selection System
• Item System
• Enemy System
• Loot Table System
• Save / Load System
• Floating Bars System
• Random Item Drop System
• Damage Detection System
• Experience System
• Quest System
• Difficulty System
• Zoning System
• Party System
Future Systems (in no particular order)
• Potion System
• Death Handling System
• Transportation System
• Dungeon System
• Anti-cheat System
Things I won't do
•Custom abilities
•Model / Graphic attachment for equipment
•Custom Attributes (Wisdom, Dexterity, Vitality, etc...)
The following documentation about each of these will increase greatly. The best way to learn is to open the map and read what is in there and try figuring some things out.
RPGFramework.j - The Entire API
API Explanation
If you need more information abotu the API's and some example, click right here or scroll down to my next post and you will see all of the information. I cannot post it here in a single post since there is a 60,000 character limit. Adding this in brings everything to 73,000 characters.
Hero Selection Screenshot
Hero Equipment Screenshot
Downloads
Changelog - This file holds all of the information of previous releases of the map, it catalogs all of the changes.
RPG Framework API - This is the API file containing all of the map's function. To use this with Jass NewGen Editor, open the folder "tesh", open the folder "includes" and then paste this file into there. The next time you open the editor the TESH addon will show the functions for you to use. Some of the functions need large documentation to understand but most are self explanatory.
RPG Framework v0.09
RPG Framework v0.08
RPG Framework v0.07
RPG Framework v0.06
RPG Framework v0.05
RPG Framework v0.04
RPG Framework v0.03
RPG Framework v0.02
RPG Framework v0.01
Enjoy
-Steel
What is this?
Stemming from my Virtual Equipment system... I've created a framework for RPG makers. The goal is to make a set of systems and functions that are easy to use as well as maintaining complete modularity. I hate it when some really cool idea only works a single way, why not make it modular and allow it to work how I want it to?! This is my primary focus. This will also help alleviate many of the basic functions that RPG developers spend on their maps. Functions like save and loading can vex a map maker and they spend a while figuring out how this work, or not at all.
Everything in this map is available for map makers to use in their RPG projects. The other primary intent of this framework is to allow the map maker freedom to focus about innovative, interesting and fun concepts with their map and not about some of the tedious system in a map. If you plan to use all or part of this framework in your map you must not claim it to be your own work.
About the RPG Framework
It's been a while since I've put something up here and the last thing I did was my Virtual Equipment system which got tossed aside. That made me a bit angry and perhaps it wasn't something very many people could find useful in their maps. Well that gave me a bit more drive to do something extremely powerful and useful for the community here. I do know that StarCraft 2 has been announced but I still believe people will find this fun and useful, I will attempt to create something similar in StarEdit when the time comes.
Disclaimers
• This is not meant for use by novice map makers. This systems in this map are very easy, but there are some steps of implementation that basic map makers must know in order to use this system. Some basic knowledge is how to import other systems (Such as Multibars) and modifying RAW ID's based on your map's data.
• I am not responsible for making these systems work in your map! (Although I will help up to a point)
• I will not post the code from the map on the forums as there is too much to post
• The map is not perfect and I'm sure someone will notice little nuances like memory leaks
• Complexity is a huge issue for some of these systems and I will be optimizing them later
• Yes, I use Cohadar's ABC and I don't care if you think some struct system is better than another. I really don't care, talk about it elsewhere!
Changelog
Version 0.09:
• Fixed Unit Library HP and MP calculations - When a unit spawns it set a variable to the unit's current hitpoints as their base hitpoints (Say 1,000). When the unit levels and gets say 4 strength, that is 100 hp increase, it does not recalculate the unit's current base hitpoints. The unit now has 1,100 hp, the variable is still set to 1,000, so when you acquire an item that increases your hitpoints by 100, it uses the variable of 1,000 and adds 100 to that resulting in 100 or a net gain of 0 hitpoints when you should get 100. [Thanks to Dabum]
• Item System Multiboard uses Darthfett's Multiboard wrapper
• Hero Selection Multiboard uses Darthfett's Multiboard wrapper
Version 0.08:
• RPGFramework.j updated
• Fixed a fatal error with the Party System
• Hero Selection System added
• Fixed an error with the Save / Load system loading a hero's gear improperly
For older version see the full changelog
Known Bugs
• The random item drop system does not disallow for duplicate drops as the boolean in the setup may suggest
Future Improvements
• More features for the Party System (Healing by Icon on left side of the screen!)
• Improve Item System function call count
• Improve performance of SetUnitMaxState for larger values
• Add Critical Strike / Dodge / Block / Parry stats for items and create special system for handling those abilities
Requirements
•vJASS
•Grim Extension Pack Hotfix - Get it from my DropBox or from Wc3c.net (last post) - This is a must in order to get some of external functions working. The last post in that thread on wc3c contains the hotfix.
•A Brain!
Finished Systems / Libraries
• Advanced Player Library
• Advanced Hero Library
• Hero Selection System
• Item System
• Enemy System
• Loot Table System
• Save / Load System
• Floating Bars System
• Random Item Drop System
• Damage Detection System
• Experience System
• Quest System
• Difficulty System
• Zoning System
• Party System
Future Systems (in no particular order)
• Potion System
• Death Handling System
• Transportation System
• Dungeon System
• Anti-cheat System
Things I won't do
•Custom abilities
•Model / Graphic attachment for equipment
•Custom Attributes (Wisdom, Dexterity, Vitality, etc...)
The following documentation about each of these will increase greatly. The best way to learn is to open the map and read what is in there and try figuring some things out.
RPGFramework.j - The Entire API
JASS:
//***********************************************************************************
//****************************cPlayer API****************************************
//***********************************************************************************
function cPlayer_CreateAllPlayers takes nothing returns nothing
//Name: CreateAllPlayers
//Param: None
//Purpose: Setup function for creating all of the cPlayer library information. This must be run in order for things to work.
//Use: call CreateAllPlayers()
//Complexity: N/A
//Return: Nothing
//Error: Nothing
local integer i = 0
local player p
loop
exitwhen i > 12
set p = Player(i)
if (GetLocalPlayer()==p) then
call cPlayer.create(GetPlayerName(p),p, i )
endif
set i = i + 1
endloop
set p = null
endfunction
function cPlayer_getPlayerInt takes integer index returns cPlayer
//Name: getPlayerInt
//Param: Integer index - The index value for one of the players.
//Purpose: This function will retrieve the cPlayer data for a specific user.
//Use: call getPlayerInt(5)
//Complexity: N/A
//Return: cPlayer
//Error: Attempting to reference an inactive player.
if CPLAYER[i].getActivity() then
return CPLAYER[i]
else
debug call BJDebugMsg("System Error: 105")
endif
return -1
endfunction
function cPlayer_getPlayerPlayer takes player p returns cPlayer
//Name: getPlayerPlayer
//Param: Player p - A single player variable
//Purpose: This function will retrieve the cPlayer data for a specific user.
//Use: call getPlayerPlayer()
//Complexity: N/A
//Return: Nothing
//Error: Attempting to reference an inactive player.
return getPlayerInt(GetPlayerId(p))
endfunction
function cPlayer_CreateUnit takes cPlayer customPlayer, integer unitID, real x, real y, real face returns unit
//Name: CreateUnit
//Param: cPlayer customePlayer - The cPlayer information for a specific player
// Integer unitID - The RAW ID for a unit that is going to be created
// Real x - The x coordinate where you wish the unit to be created
// Real y - The y coordinate where you wish the unit to be created
// Real face - The facing angle for the newly created unit
//Purpose: This function creates a unit for the cPlayer that is passed in
//Use: call CreateUnit(cPlayer_getPlayerPlayer(GetTriggerPlayer()), 'H000', 47, 182, 28)
//Complexity: N/A
//Return: Unit u
//Error: Nothing
return customPlayer.createUnit(unitID,x,y,face)
endfunction
function cPlayer_Setup takes integer maximumPlayers returns nothing
//Simple function that takes in the maximum number of players in the map.
set PLAYER_MAX = maximumPlayers
endfunction
//***********************************************************************************
//******************************Hero API*****************************************
//***********************************************************************************
function Hero_FindByIndex takes integer index returns herotype
return heroes[index]
endfunction
function Hero_FindByID takes integer id returns herotype
local integer i = 0
loop
exitwhen i>count
if heroes[i].unitid==id then
return heroes[i]
endif
set i = i + 1
endloop
debug call BJDebugMsg("FindByID == -1")
return -1
endfunction
function Hero_FindByUnit takes unit u returns herotype
return FindByID(GetUnitTypeId(u))
endfunction
function Hero_AddTypeAdvanced takes integer unitID, string unitDescription, boolean dualWield returns nothing
//Name: AddClassAdvanced
//Param: Integer unitID - Raw ID of unit to be added as a herotype
// String unitDescription - The description of the herotype you will be adding
// Boolean dualWield - Allows this herotype to dual wield weapons
//Purpose: Dynamically allocate any unit as a herotype. This adds in the Raw ID to our database of herotypes
//Use: call AddClass('H000', "This is a short description of our hero", true)
//Complexity: O(1)
//Return: Nothing - Function modifies the heroes array database.
//Error: Adding more classes than allowed
if count > max then
call BJDebugMsg("System Error: 101")
return
endif
if count == 0 then
set heroes[count] = herotype.create('RNDM', " Selecting this will give you a randomly chosen hero", true)
set count = count + 1
endif
set heroes[count] = herotype.create(unitID, unitDescription, dualWield)
set count = count + 1
endfunction
function Hero_AddType takes integer unitID returns nothing
//Name: AddClass
//Reference: See function AddClassAdvanced
call AddTypeAdvanced(unitID, "No Description Available", false)
endfunction
function Hero_AddAbilityAdvanced takes integer unitID, string abilityName, string abilityDescription, string abilityIcon returns nothing
//Name: AddAbilityAdvanced
//Param: Integer unitID - Raw ID of the unit we wish to add an ability for into our database.
// String abilityName - The name of the ability you would like to add for the aforementioned unit
// String abilityDescription - The description of the ability you have presented to the above
// String abilityicon - This will display an icon of the ability on the multiboard for hero selection. If left blank the icon will be omitted.
//Purpose: This function is for displaying the ability a unit has on a multiboard for hero selection. It has no bearing on the actual abilities a unit has.
//Use: call AddClass('H000', "Holy Light", "Heals a friendly target", "")
//Complexity: N/A
//Return: Nothing
//Error: Nothing
call FindByID(unitID).addAbility(abilityName, abilityDescription, abilityIcon)
endfunction
function Hero_AddAbility takes integer unitID, string abilityName, string abilityDescription returns nothing
//Name: AddAbility
//Reference: See function AddAbilityAdvanced
call AddAbilityAdvanced(unitID, abilityName, abilityDescription, "")
endfunction
function Hero_SelectionSetupAdvanced takes real xSelect, real ySelect, real distance, real xSpawn, real ySpawn returns nothing
//Name: SelectionSetupAdvanced
//Param: Real xSelect - The x coordinate for the selection area where heroes will be placed [Default is -1]
// Real ySelect - The y coordinate for the selection area where heroes will be placed [Default is -1]
// Real distance - The distance between the center of our (x,y) location to where our unit's will be placed [Default is 250]
// Real xSpawn - The x coordinate for where your selected hero will spawn.
// Real ySpawn - The y coordinate for where your selected hero will spawn.
//Purpose: This is the advanced selection setup function. The xSelect and ySelect denote where the heroes will be placed, the heroes will be placed in a circle around this location. The distance variable tells how far the units are place, in other words the circle's radius. The xSpawn and ySpawn are used when you select a hero, the unit is placed there.
//Use: call AddClass(0,0, 250, 750, -200)
//Complexity: N/A
//Return: Nothing
//Error: No herotypes added to the system.
set xselect = xSelect
set yselect = ySelect
set d = distance
set xspawn = xSpawn
set yspawn = ySpawn
if count == 0 then
call BJDebugMsg("System Error: 130")
return
endif
call SelectionCreateHeroes()
endfunction
function Hero_Setup takes integer maxLevel, rect selectAreaRect, rect spawnAreaRect returns nothing
//Name: Setup
//Param: Integer maxLevel - The maximum level of heroes in your map.
// Rect selectAreaRect - The rect where the hero selection system will create the unit's for selecting
// Rect spawnAreaRect - The rect where the hero selection system will spawn a unit when you pick a hero
//Purpose: This function must be called last for the setup purposes. The above parameters should yield enough information about this function
//Use: call AddClass(50,gg_rct_select, gg_rct_spawn)
//Complexity: N/A
//Return: Nothing
//Error: Nothing
set MAX_LEVEL = maxLevel
//This is a private function
call SelectionSetup(selectAreaRect, spawnAreaRect)
endfunction
public function getMaxLevel takes nothing returns integer
return MAX_LEVEL
endfunction
//***********************************************************************************
//******************************Unit API*****************************************
//***********************************************************************************
function Unit_CreateNew takes integer unitID, player whichPlayer, real x, real y, real face returns Unit
local unit u = CreateUnit(whichPlayer, unitID, x,y,face)
local Unit temp = Unit.create(u,count)
set count = count + 1
//call Unit.create(u, p, getUnitTypeId(id), x, y, face)
//set enemy_unit[enemy_unit_count] = Enemy.create(u, p, getEnemyTypeId(id), x, y, face)
//set enemy_unit_count = enemy_unit_count + 1
set u = null
return temp
endfunction
function Unit_AddExisting takes unit whichUnit returns Unit
//Adds a preplaced unit to the database
local Unit temp = Unit.create(whichUnit, count)
set count = count + 1
return temp
endfunction
function Unit_AddAllExisting takes player whichPlayer returns nothing
local group g = CreateGroup()
local unit u
call GroupEnumUnitsOfPlayer(g, whichPlayer, null)
loop
set u = FirstOfGroup(g)
exitwhen u == null
call AddExisting(u)
call GroupRemoveUnit(g, u)
endloop
call DestroyGroup(g)
set g = null
set u = null
endfunction
//Adds a special unit type to the database
function Unit_AddType takes integer unitID, string unitName, string lootTable, real baseMovespeed, integer hitpointBase, integer manapointBase, real respawnTime, real experienceYield, real goldYield returns nothing
if (getUnitTypeId(unitID) == -1) then
set unittypes[counttypes] = UnitType.create(unitID, unitName, lootTable, baseMovespeed, hitpointBase, manapointBase, respawnTime, experienceYield, goldYield)
set counttypes = counttypes + 1
else
call BJDebugMsg("System Error: 110")
endif
endfunction
function Unit_getCount takes nothing returns integer
return count
endfunction
function Unit_Find takes unit whichUnit returns Unit
local integer index = GetUnitUserData(whichUnit)
if index == 0 then
call BJDebugMsg("System Error: 127")
return -1
endif
return units[index]
endfunction
function Unit_FindIndex takes unit whichUnit returns integer
local integer i = 0
loop
exitwhen i > count
if (whichUnit == units[i].u) then
return i
endif
set i = i + 1
endloop
return -1
endfunction
//***********************************************************************************
//****************************Floating Bars API**************************************
//***********************************************************************************
function FloatingBars_Enabled takes nothing returns boolean
return enabled
endfunction
function FloatingBars_RemoveBar takes unit whichUnit returns boolean
local integer i = FindUnitIndex(whichUnit)
if (i==-1) then
debug call BJDebugMsg("Error unit not in index")
return false
else
call RemoveBarInt(i)
endif
return true
endfunction
function FloatingBars_AddBar takes unit whichUnit, boolean showLife, boolean showMana returns FloatingStruct
local FloatingStruct fs = 0
debug call BJDebugMsg("AddBar called: "+GetUnitName(whichUnit))
if (not(FindUnitIndex(whichUnit)==-1)) then
debug call BJDebugMsg("Error: Duplicate Floating Bar Creation Called")
return -1
endif
if ((not(showLife)) and (not(showMana))) then
debug call BJDebugMsg("System Error: 112")
return -1
endif
set fs = FloatingStruct.create(whichUnit, showLife, showMana)
set structlink[FS_COUNT] = fs
set FS_COUNT=FS_COUNT+1
return fs
endfunction
function FloatingBars_Setup takes boolean enableSystem, boolean addHeroesOnly, boolean showLife, boolean showMana returns nothing
set enabled = enableSystem
set fb_heroes = addHeroesOnly
set fb_life = showLife
set fb_mana = showMana
endfunction
function FloatingBars_AdvancedSetup takes boolean enableSystem, boolean addHeroesOnly, boolean showLife, boolean showMana, string displayCharacter, integer barLength, real barSize, real X_OffSet_Life, real Y_OffSet_Life, real X_OffSet_Mana, real Y_OffSet_Mana, real frequency returns nothing
call Setup(enableSystem, addHeroesOnly, showLife, showMana)
set DisplayCharacter = displayCharacter
set BarLength = barLength
set BarSize = barSize
set XOffSet = X_OffSet_Life
set YOffSet = Y_OffSet_Life
set XOffSetM = X_OffSet_Mana
set YOffSetM = Y_OffSet_Mana
set Frequency = frequency
endfunction
//***********************************************************************************
//******************************Item System API**************************************
//***********************************************************************************
function ItemSystem_Setup takes nothing returns nothing
//Required function to enable the system
if Regeneration_Enabled() then
set columns = columns + 2
endif
endfunction
function ItemSystem_Multiboard_DisplayByPlayer takes player whichPlayer returns nothing
//DisplayByPlayer - Takes in a player, example: Player(0) can be passed into the function to display that multiboard
if (GetLocalPlayer()==whichPlayer) then
call MultiboardDisplay(cPlayer_getPlayerPlayer(whichPlayer).item_system_multiboard, true)
endif
endfunction
function ItemSystem_Multiboard_DisplayByInt takes integer whichIndex returns nothing
//DisplayByInt - Takes in a player's id. For example, the person in the Player Slot 1 is referenced by integer 0
//Passing in 0 to this function is the same as using the DisplayByPlayer function with Player(0)
//Note: Index starts at 0
if (whichIndex>11 or whichIndex<0) then
call BJDebugMsg("System Error: 104")
endif
call DisplayByPlayer(Player(whichIndex))
endfunction
function ItemSystem_Multiboard_DisplayAll takes nothing returns nothing
//DisplayAll - This function forces all players to view their inventory multiboard
local integer i = 0
loop
exitwhen i > 9
call DisplayByInt(i)//Call by int to force integer check
set i = i + 1
endloop
endfunction
function ItemSystem_Multiboard_Create takes integer whichIndex returns nothing
//This function requires a player's index to create a multiboard for them
local multiboarditem mbi = null
local integer k = 0
local integer rows = SLOT_COUNT+1
local integer curr = 0
local real icon_width = 1.5
//Create the whole thing
call MultiboardSetRowCount(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, rows+1)
call MultiboardSetColumnCount(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, columns)
call MultiboardSetTitleText(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, cPlayer_getPlayerInt(whichIndex).name)
call MultiboardDisplay( cPlayer_getPlayerInt(whichIndex).item_system_multiboard,true )
//Column 0 -- Icons
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "UI\\Widgets\\Console\\Human\\human-inventory-slotfiller.blp")
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0,curr)
call MultiboardSetItemStyle(mbi, false, false)
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, SLOT_COUNT+1,curr)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardSetItemStyle(mbi, false, false)
set curr = curr + 1
//Column 1 -- Slot
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemValue(mbi, " |c00808080-"+IS_SLOT[k]+"-|r")
call MultiboardSetItemWidth(mbi, 8.0/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0,curr)
call MultiboardSetItemValue(mbi, " Slot")
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, SLOT_COUNT+1, curr)
call MultiboardSetItemWidth(mbi, 8.0/100)
//call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemValue(mbi, " |c00808040Totals|r:")
set curr = curr + 1
//Column 2 -- Damage
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "UI\\Widgets\\Console\\Human\\infocard-neutral-attack-melee.blp")
set curr = curr + 1
//Column 3 -- Armor
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "UI\\Widgets\\Console\\Human\\infocard-neutral-armor-medium.blp")
set curr = curr + 1
//Column 4 -- Health
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "ReplaceableTextures\\CommandButtons\\BTNHealthStone.blp")
set curr = curr + 1
//Column 5 -- Mana
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "ReplaceableTextures\\CommandButtons\\BTNManaStone.blp")
set curr = curr + 1
//Column 6 -- Strength
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "UI\\Widgets\\Console\\Human\\infocard-heroattributes-str.blp")
set curr = curr + 1
//Column 7 -- Agility
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "UI\\Widgets\\Console\\Human\\infocard-heroattributes-agi.blp")
set curr = curr + 1
//Column 8 -- Intelligence
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "UI\\Widgets\\Console\\Human\\infocard-heroattributes-int.blp")
set curr = curr + 1
//Column 9 -- Movespeed
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp")
set curr = curr + 1
if Regeneration_Enabled() then
//Column 10 -- Health Regen
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "ReplaceableTextures\\CommandButtons\\BTNReplenishHealth.blp")
set curr = curr + 1
endif
if Regeneration_Enabled() then
//Column 11 -- Mana Regen
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, k,curr)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, 0, curr)
call MultiboardSetItemStyle(mbi, false, true)
call MultiboardSetItemIcon(mbi, "ReplaceableTextures\\CommandButtons\\BTNReplenishMana.blp")
set curr = curr + 1
endif
//Last Row (totals)
set k = 2
loop
set mbi = MultiboardGetItem(cPlayer_getPlayerInt(whichIndex).item_system_multiboard, SLOT_COUNT+1,k)
call MultiboardSetItemStyle(mbi, true, false)
call MultiboardSetItemWidth(mbi, icon_width/100)
call MultiboardReleaseItem(mbi)
set k = k + 1
exitwhen k>rows
endloop
set k = 0
call DisplayByInt(whichIndex)
endfunction
//ItemSystem_Multiboard_CreateAll
function ItemSystem_Multiboard_CreateAll takes nothing returns nothing
local integer i = 0
local integer j = 1
loop
exitwhen i > 10
call Create(i)
set i = i + 1
endloop
endfunction
//End Multiboard Scope
function ItemSystem_getItemDatabaseID takes integer databaseIndex returns ItemStruct
return ITEM_DATABASE[databaseIndex]
endfunction
function ItemSystem_setItemDatabase takes ItemStruct whichItemStruct returns nothing
set ITEM_DATABASE[count] = whichItemStruct
endfunction
function ItemSystem_incrementCount takes nothing returns nothing
set count = count + 1
endfunction
function ItemSystem_getItemCount takes nothing returns integer
return count
endfunction
function ItemSystem_setItemCount takes integer value returns nothing
set count = value
endfunction
function ItemSystem_CreateCustomItem takes integer itemID, integer whichSlot, string itemType, integer whichHeroes, integer levelRequirement, integer strengthRequirement, integer agilityRequirement,integer intelligentRequirement, integer strengthBonus, integer agilityBonus, integer intelligentBonus, integer damageBonus, integer armorBonus, integer hitpointBonus, integer manapointBonus, string modelPath returns nothing
call ItemStruct.create(itemID, whichSlot, itemType, whichHeroes, levelRequirement, strengthRequirement, agilityRequirement, intelligentRequirement, strengthBonus, agilityBonus, intelligentBonus, damageBonus, armorBonus, hitpointBonus, 0., manapointBonus, 0., 0, 0, modelPath)
endfunction
function ItemSystem_CreateCustomItemAdvanced takes integer itemID, integer whichSlot, string itemType, integer whichHeroes, integer levelRequirement, integer strengthRequirement, integer agilityRequirement,integer intelligentRequirement, integer strengthBonus, integer agilityBonus, integer intelligentBonus, integer damageBonus, integer armorBonus, integer hitpointBonus, real hitpointRegen, integer manapointBonus, real manapointRegen, integer abilityID, integer movespeedBonus, string modelPath returns nothing
call ItemStruct.create(itemID, whichSlot, itemType, whichHeroes, levelRequirement, strengthRequirement, agilityRequirement, intelligentRequirement, strengthBonus, agilityBonus, intelligentBonus, damageBonus, armorBonus, hitpointBonus, hitpointRegen, manapointBonus, manapointRegen, abilityID, movespeedBonus, modelPath)
endfunction
function ItemSystem_FindItem takes integer itemID returns ItemStruct
//Name: FindItem
//Param: Integer itemid - Item's RAW ID value
//Purpose: Check database of items for itemid.
// If item exists in database it returns the data
//Use: set itemstruct = FindItem('I000')
//Complexity: O(n)
//Return: ItemStruct - Two cases
// Successful - Returns ItemStruct for given Item's RAW ID
// Unsuccessful - Returns the integer -1
//Error: Item does not exist in database
local integer i = 0
loop
exitwhen i>count
if i<5 then
endif
if itemID==ITEM_DATABASE[i].item_id then
return getItemDatabaseID(i)
endif
set i = i + 1
endloop
call BJDebugMsg("System Error: 100")
return -1
endfunction
function ItemSystem_AddSlot takes string slotName returns nothing
if SLOT_COUNT > SLOT_MAX then
call BJDebugMsg("System Error: 102")
return
endif
set SLOT_COUNT = SLOT_COUNT + 1
set IS_SLOT[SLOT_COUNT] = slotName
endfunction
function ItemSystem_GetSlotName takes integer slotIndex returns string
return IS_SLOT[slotIndex]
endfunction
function ItemSystem_DestroyItem takes unit whichUnit, integer whichSlot returns nothing
//This function removes an item from the given unit of the respective slot
local integer idx = GetPlayerId(GetOwningPlayer(whichUnit))
local ItemStruct is = cPlayer_getPlayerInt(idx).hero.equipment.itemstruct[whichSlot]
//If there is no item
if is.item_id<1 then
call Misc_SimError(GetOwningPlayer(whichUnit), "There is no item in that slot.")
return
endif
call ItemUpdateChar(whichUnit,is,-1)
call UpdateMultiboard(idx,whichSlot, is, false)
call CreateItem(is.item_id, GetUnitX(whichUnit), GetUnitY(whichUnit))
call Misc_SimError(GetOwningPlayer(whichUnit), "Dropping: "+is.item_name)
//Deconstruction
//We cannot call the .destroy() because it removes the item from the database
set cPlayer_getPlayerInt(idx).hero.equipment.itemstruct[whichSlot] = 0
endfunction
function ItemSystem_ForceEquipItem takes unit whichUnit, integer itemID returns boolean
//ForceEquip without restrictions
//This function is used for the loading system
//Some item may have no requirements to wear it but provide +50 to all stats
//if that item is not equip, some other items may depend upon those stats
//Thus disallowing other items to be equip.
local item i = CreateItem(itemID, 0,0)
local ItemStruct is = FindItem(itemID)
local string str = ""
local integer temp
if (is == -1) then
return false
endif
set temp = ItemSlotCheck(is,whichUnit)
//Checks slot avaliability
if temp == -1 then
call ItemFinish(whichUnit, "Equipment slot unavailable.")
else
call ItemUpdateChar(whichUnit, is, 1)
call ItemAddToChar(whichUnit,i, is, temp)
return true
endif
return false
endfunction
function ItemSystem_EquipItemItem takes unit whichUnit, item whichItem returns boolean
local integer it = GetItemTypeId(whichItem)
local ItemStruct is = FindItem(it)
local string str = ""
local integer temp
if (is == -1) then
return false
endif
if not(CheckPermissions(R2I(Pow(2, FindClassIndex(GetUnitTypeId(whichUnit)))), is.who)) then
call ItemFinish(whichUnit, "Your class cannot use that.")
return false
endif
set str = ItemStatCheck(whichUnit, is)
if not(str=="") then
call BJDebugMsg("str=' '")
call ItemFinish(whichUnit, str)
return false
endif
debug call BJDebugMsg("Dependencies met")
set temp = ItemSlotCheck(is,whichUnit)
//Checks slot avaliability
if temp == -1 then
call ItemFinish(whichUnit, "Equipment slot unavailable.")
else
call ItemUpdateChar(whichUnit, is, 1)
call ItemAddToChar(whichUnit,whichItem, is, temp)
return true
endif
return false
endfunction
function ItemSystem_EquipItemId takes unit whichUnit, integer itemID returns boolean
local item i = CreateItem(itemID, 0,0)
if not(EquipItemItem(whichUnit, i)) then
call RemoveItem(i)
set i = null
return false
endif
set i = null
return true
endfunction
//***********************************************************************************
//****************************Save/Load System API***********************************
//***********************************************************************************
function SaveLoad_Setup takes boolean disableSinglePlayer, boolean saveHero, boolean saveLevel, boolean saveExperience, boolean saveStrength, boolean saveAgility, boolean saveIntelligence, boolean saveInventory, boolean saveEquipment, boolean saveGold, boolean saveLumber returns nothing
local integer index = 2
local integer temp
set nosingleplayer = disableSinglePlayer
set save_hero = saveHero
set save_level = saveLevel
set save_exp = saveExperience
set save_str = saveStrength
set save_agi = saveAgility
set save_int = saveIntelligence
set save_inventory = saveInventory
set save_equipment = saveEquipment
set save_gold = saveGold
set save_lumber = saveLumber
//Map Version initial
set total_save = total_save+1
if save_hero then
set total_save = total_save+1
endif
if save_level then
set total_save = total_save+1
endif
if save_exp then
set total_save = total_save+1
endif
if save_str then
set total_save = total_save+1
endif
if save_agi then
set total_save = total_save+1
endif
if save_int then
set total_save = total_save+1
endif
if save_inventory then
set total_save = total_save+6 //6 inventory slots
endif
if save_equipment then
set total_save = total_save+SLOT_COUNT
endif
if save_gold then
set total_save = total_save+1
endif
if save_lumber then
set total_save = total_save+1
endif
debug call BJDebugMsg("Total Save = "+I2S(total_save))
set codemaker_vals[0] = total_save
set codemaker_size[1] = 2 //2^2, 4 different map versions
if save_hero then
set codemaker_size[index] = BinPow(Hero_Count())
set index = index + 1
endif
if save_level then
set codemaker_size[index] = BinPow(Hero_getMaxLevel())
set index = index + 1
endif
if save_exp then
set codemaker_size[index] = BinPow(100)
set index = index + 1
endif
if save_str then
set codemaker_size[index] = BinPow(200)
set index = index + 1
endif
if save_agi then
set codemaker_size[index] = BinPow(200)
set index = index + 1
endif
if save_int then
set codemaker_size[index] = BinPow(200)
set index = index + 1
endif
set temp = 0
if save_inventory then
loop
exitwhen temp > 5
set codemaker_size[index] = BinPow(ItemSystem_getItemCount())
set temp = temp + 1
set index = index + 1
endloop
endif
set temp = 1//Slot count index starts on 1
if save_equipment then
loop
exitwhen temp>SLOT_COUNT
set codemaker_size[index] = BinPow(ItemSystem_getItemCount())
set temp = temp + 1
set index = index + 1
endloop
endif
if save_gold then
set codemaker_size[index] = BinPow(MAX_GOLD)
set index = index + 1
endif
if save_lumber then
set codemaker_size[index] = BinPow(MAX_LUMBER)
set index = index + 1
endif
endfunction
//***********************************************************************************
//****************************LootTable System API***********************************
//***********************************************************************************
function LootTable_Create takes string nameOfTable, integer numerOfDrops, boolean allowDuplicate returns nothing
set loot_table[loot_table_count] = LootTable.create(nameOfTable, numerOfDrops, allowDuplicate)
set loot_table_count = loot_table_count + 1
endfunction
function LootTable_Find takes string nameOfTable returns LootTable
local integer i = 0
//call BJDebugMsg("Finding...."+name)
loop
exitwhen i > loot_table_count
//call BJDebugMsg("loot_table["+I2S(i)+"]"+loot_table[i].name)
if (loot_table[i].name == nameOfTable) then
return loot_table[i]
endif
set i = i + 1
endloop
return -1
endfunction
function LootTable_addItem takes string nameOfTable, integer itemID, integer chanceToDrop returns nothing
local LootTable lt = Find(nameOfTable)
local integer sum = lt.sumChance()
if (chanceToDrop <= 0) then
call BJDebugMsg("System Error: 109")
return
endif
if (lt == -1) then
call BJDebugMsg("System Error: 107")
return
endif
if (sum>100) then
call BJDebugMsg("System Error: 108")
return
endif
call lt.add_Item(itemID, chanceToDrop)
endfunction
//***********************************************************************************
//****************************Experience System API**********************************
//***********************************************************************************
function Experience_Enabled takes nothing returns boolean
return enable
endfunction
function Experience_Fancy takes nothing returns boolean
return fancy
endfunction
function Experience_Share takes nothing returns boolean
return share
endfunction
function Experience_Split takes nothing returns boolean
return split and share //Split true..share false...returns false. Split ok, share false so its only for one unit
endfunction
function Experience_Range takes nothing returns real
return range
endfunction
function Experience_Trigger takes nothing returns trigger
return experience
endfunction
function Experience_Setup takes boolean enableSystem, boolean fancyDisplay, boolean shareExperience, boolean splitExperience, real maxRange returns nothing
set enable = enableSystem
set fancy = fancyDisplay
set share = shareExperience
set split = splitExperience
set range = maxRange
endfunction
//***********************************************************************************
//******************************Damage System API************************************
//***********************************************************************************
function Damage_AddType takes string damageName returns nothing
set DamageTypes[count] = damageName
set count = count + 1
endfunction
function Damage_Setup takes boolean enableSystem,boolean ShowFloatingText, boolean customArmor returns nothing
set enabled = enableSystem
set floatingtext = ShowFloatingText
set armor = customArmor
endfunction
//***********************************************************************************
//******************************Zoning System API************************************
//***********************************************************************************
function Zoning_AddRegion takes region whichRegion, string zoneName returns nothing
set trig[count] = CreateTrigger()
set zone[count] = whichRegion
set name[count] = zoneName
call TriggerRegisterEnterRegion(trig[count], whichRegion, null)
call TriggerAddCondition(trig[count], Condition( function Conditions ) )
call TriggerAddAction(trig[count], function Actions)
set count = count + 1
endfunction
function Zoning_AddRect takes rect whichRect, string zoneName returns nothing
local region r = CreateRegion()
call RegionAddRect(r, whichRect)
call AddRegion(r, zoneName)
endfunction
//***********************************************************************************
//*******************************Quest System API************************************
//***********************************************************************************
function Quest_Create_Kill takes integer startUnitID, real startUnitX, real startUnitY, real startUnitFace, integer levelRequirementMinimum, integer levelRequirementMaximum, boolean repeatable, integer unitToKillID, integer howMany, string questTitle, string questDescription, string questIcon, integer rewardItemID, integer rewardExp, integer rewardGold, integer rewardLumber returns nothing
call Create("Kill", startUnitID, startUnitX, startUnitY, startUnitFace, levelRequirementMinimum, levelRequirementMaximum, repeatable, unitToKillID, howMany, -1, -1, null, -1, questTitle, questDescription, questIcon, rewardItemID, rewardExp, rewardGold, rewardLumber)
endfunction
//***********************************************************************************
//*****************************Difficulty System API*********************************
//***********************************************************************************
function Difficulty_Get takes nothing returns DifficultySetting
return current_difficulty_setting
endfunction
function Difficulty_Enabled takes nothing returns boolean
return enabled
endfunction
public function Choose takes nothing returns nothing returns nothing
local Dialog d
local player p
local integer i = 0
local integer j = 0
local timer t = CreateTimer()
if not (enabled) then
call BJDebugMsg("System Error: 120")
call DestroyTimer(t)
set t = null
set p = null
return
endif
if custom and count > 1 then
loop
exitwhen j>10 or (choice and j==1)
set p = Player(j)
set d = Dialog.create()
call d.SetMessage("Select A Difficulty")
loop
exitwhen i == count
call d.AddButton("[|c00FFFFFF"+I2S(i+1)+"|r] - "+setting[i].name+" - |c0000FF00"+I2S(R2I(setting[i].hp*100))+"% HP|r / |c00808040"+I2S(R2I(setting[i].exp*100))+"% XP|r / |c00FF0000"+I2S(R2I(setting[i].dmg*100))+"% DMG|r", 49+i)
set i = i + 1
endloop
set i = 0
call d.AddAction( function Callback )
call d.Show(p)
set j = j + 1
endloop
endif
call BJDebugMsg("You have "+I2S(time)+" seconds to choose the difficulty")
call TriggerSleepAction(5)
if choice then
call BJDebugMsg("|c00FF0000Player 1|r is deciding the difficulty")
else
call BJDebugMsg("Deciding Difficulty...")
endif
call TimerStart(t, time, false, function Timer)
set t = null
set p = null
endfunction
function Difficulty_Add takes string name_of_difficulty, real enemy_hp_percentage, real experience_yield_percentage, real enemy_damage_percentage returns nothing
local DifficultySetting ds = DifficultySetting.create(name_of_difficulty,enemy_hp_percentage,experience_yield_percentage,enemy_damage_percentage)
if not (enabled) then
call BJDebugMsg("System Error: 120")
return
endif
if count == 7 then
call BJDebugMsg("System Error: 118")
return
endif
set setting[count] = ds
set count = count + 1
endfunction
function Difficulty_Setup takes boolean enableSystem, boolean useCustomDifficulties, boolean playerOneChooses, integer timeToChoose returns nothing
set enabled = enableSystem
set custom = useCustomDifficulties
set choice = playerOneChooses
set time = timeToChoose
set count = 0
endfunction
//***********************************************************************************
//*******************************Party System API************************************
//***********************************************************************************
function Party_Enabled takes nothing returns boolean
return enabled
endfunction
function Party_ExpBonus takes nothing returns real
return expBonus
endfunction
function Party_shareExp takes nothing returns boolean
return shareExpExclusive
endfunction
function Party_FindPlayerParty takes player whichPlayer returns Party
local integer i = 0
local integer j = 0
local Party party = 0
loop
exitwhen i>count_party_list
set party = partylist[i]
loop
exitwhen j >party.count
if party.members[j].p == whichPlayer then
return party.members[j]
endif
set j = j + 1
endloop
set j = 0
set i = i + 1
endloop
return -1
endfunction
function Party_Setup takes boolean enableSystem, boolean show_Name, boolean show_HP, boolean show_MP, boolean show_EXP, boolean ShareExperienceOnlyWithPartyMembers, real experienceBonus returns nothing
set display_count = 0
if enableSystem then
set enabled = true
endif
if enabled then
if show_Name then
set showName = show_Name
set display_count = display_count+1
endif
if show_HP then
set showHP = show_HP
set display_count = display_count+1
endif
if show_MP then
set showMP = show_MP
set display_count = display_count+1
endif
if show_EXP then
set showEXP = show_EXP
set display_count = display_count+1
endif
if experienceBonus > expBonus then
set expBonus = experienceBonus
endif
if ShareExperienceOnlyWithPartyMembers then
set shareExpExclusive = true
endif
endif
endfunction
//***********************************************************************************
//***************************Regeneration System API*********************************
//***********************************************************************************
function Regeneration_Enabled takes nothing returns boolean
return enabled
endfunction
function Regeneration_Setup takes boolean enableSystem, real UpdateTime returns nothing
set enabled = enableSystem
set updateTime = UpdateTime
if enabled then
set t = NewTimer()
call TimerStart(t, updateTime, true, function Regen_Timer)
endif
endfunction
API Explanation
If you need more information abotu the API's and some example, click right here or scroll down to my next post and you will see all of the information. I cannot post it here in a single post since there is a 60,000 character limit. Adding this in brings everything to 73,000 characters.
Hero Selection Screenshot

Hero Equipment Screenshot

Downloads
Changelog - This file holds all of the information of previous releases of the map, it catalogs all of the changes.
RPG Framework API - This is the API file containing all of the map's function. To use this with Jass NewGen Editor, open the folder "tesh", open the folder "includes" and then paste this file into there. The next time you open the editor the TESH addon will show the functions for you to use. Some of the functions need large documentation to understand but most are self explanatory.
RPG Framework v0.09
RPG Framework v0.08
RPG Framework v0.07
RPG Framework v0.06
RPG Framework v0.05
RPG Framework v0.04
RPG Framework v0.03
RPG Framework v0.02
RPG Framework v0.01
Enjoy
-Steel
Last edited: