Scripts / RPG Module

Author
Message
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 14th Nov 2015 22:14 Edited at: 23rd Oct 2016 23:04
I created a set of scripts that turn games created with GameGuru into Action RPG. Parts of the script are published in the Asset Store and the rest I'll post to this thread. Video about my scripts so far:

https://www.youtube.com/watch?v=3iBF_PH9kxA

Note for all the users of RPG or Survival Module:

Parts of RPG Module, Quest system and Survival module are not fully compatible with the official Save Game and Load Game function of GameGuru out-of-box. In order to make the scripts work properly, please use the modified gamedata.lua provided in the bottom of this post. With that, all of my sripts in the Store should work properly. If not, please PM me with a bug report.


If you are having problems, first make sure you are using the latest versions of the scripts (you can check the file edit dates of the newest updates of the Store scripts in this thread). If (for some reason) you want to use the older version of the script set, you can use the alternative Save Game / Load Game system provided in the script "RPG Menu with Save Game / Load Game".

Status 24.10.2016. All the scripts in The Game Creators Asset Store have been updated. The free scripts in this thread (except modified gamedata.lua) are not yet compatible with the official Save Game / Load Game system. I'm currently updating them, but testing the updated versions takes time, so please be patient! I'll update all of them at the same time when the whole work is finished. If the publishing of your game is dependent on the functionality of my free script, please PM me, so I'll send you the newest version of the individual script you need. Otherwise please wait for the updates in this post.

moshroom_rpg_ai_fantasycharacter.lua (version 1.4.1, 10.10.2016)

The Action RPG Battle Mechanics script or "RPG AI" replaces the default damage control of GameGuru by one that is based on RPG statistics. Player will have four basic statistics: Power (SpellPower), Vitality, Agility and Sight. Power determines how many points of damage player's attack will cause to an enemy in addition to the damage caused by equipped weapon. For 3rd person wizard character, Power determines the size of the fireball. Vitality determines (inversely) how many points of damage enemy's attack will cause to player. Agility determines how often player can infilct damage to an entity and Sight how far away. If player tries to hit too often, enemy will evade and if too far away, the hit will miss. Every kill will grant player EXP, which will result in Level up in time to time. In each level up, one of the basic statistics will be upgraded. Player will also be granted gold. The "RPG AI" is published in the Asset Store:

https://en.tgcstore.net/product/25685

moshroom_rpg_menu.lua (version 1.4.1, 10.10.2016)

This script creates RPG Menu where player can access Inventory, Equipment and Status screens. The options screen give player a possibility to change font size, cursor behaviour, set the info text of RPG Menu and Shop Menu on/off and change the style of dialogue in the game. The behaviour of the menu depends on the other RPG scripts on the map.

The RPG Menu is published in the Asset Store:

https://en.tgcstore.net/product/25687

moshroom_rpg_shop.lua (version 1.4.1, 10.10.2016)

This script creates Shop Menu where player can buy items, weapons, armor and accessory, depending on other scripts used in the game.

If this is used alone without my other RPG Scripts, player starts with 10000 Gold. Items player buys will be used right away. In 1st person mode there are 4 items: Healing Potion, High Potion and Elixir that fill players health up to MAXHP and Boost Potion that can add health over MAXHP. In 3rd person mode there is an additional item Power Source that raises SpellPower of wizard character. (NOTE: This overrides the default Power stat with g_RPG_SpellPower which mean that it nullifies the collected Magic items.)

If there is an entity with moshroom_rpg_ai_fantasycharacter.lua on the map, player starts with 0 Gold. In addition to 4 healing item available in the shop, there are 4 RPG items, Power Source, Vitality Source, Agility Source and Sight Source that raise corresponding RPG statistics. If there is an entity with moshroom_rpg_menu.lua or moshroom_rpg_menu_savepoint.lua in the map, the items bought from the shop are not used right away, but stored into the Inventory for later use. If moshroom_rpg_ai_fantasycharacter.lua as well as the moshroom_rpg_menu.lua are placed on the map and third person mode is active, player can also buy equipment.

The RPG Shop is published in the Asset Store:

https://en.tgcstore.net/product/25686

moshroom_rpg_npc_talking.lua (version 1.4.1, 10.10.2016)

This script creates and NPC who talks. Depending on the settings, the NPC will talk either custom lines determined by user or random generic lines. The Talking NPC is published in the Asset Store:

https://en.tgcstore.net/product/25834

moshroom_quest_*.lua (version 1.131, 10.10.2016)

For my Quest script, please visit this thread in the Store forum:

https://forum.game-guru.com/thread/214274

moshroom_map_*.lua (version 2.1, 18.10.2016)

This is an enhanced version of my winzone/returnzone scripts. It stores player data between maps and enables returning to the last checkpoint of previous map. It's a bit tricky to use so read the instructions carefully. The script is published in the Asset Store:

https://en.tgcstore.net/product/26457

moshroom_time_*.lua (version 1.131, 13.10.2016)

This script creates a set of doors that are operated by time. The script is published in the Asset Store:

https://www.tgcstore.net/product/27997

moshroom_rpg_status_prompt.lua

If there is no RPG Menu, this can be used to check the status. Creates an NPC who tells player his/her RPG statistics.

moshroom_rpg_collectable.lua

If there is no RPG Menu script active on the map, this works just as regular collectable (health.lua). If there is RPG Menu, an item will be added to the inventory. The item can be chosen by assigning a number between 1-14 as the entity name (1 = Healing Potion, 2 = High Potion, 3 = Boost Potion, 4 = Elixir, 5 = Antidote, 6 = Stimulant, 7 = Tonic, 8 = Hourglass, 9 = Eye Drops, 10 = Panacea, 11 = Power Source, 12 = Vitality Source, 13 = Agility Source, 14 = Sight Source).

moshroom_rpg_expdoor.lua

This script creates a door that can be opened when player has enough EXP. Set the EXP limit by changing the 'Strenght' value of the door entity.

moshroom_rpg_expweapon.lua

This script creates a 1st person weapon that can be collected when player has enough EXP. Set the EXP limit by changing the 'Strenght' value of the weapon entity.

moshroom_rpg_battlemessage.lua

This script changes battlemessage from prompt to windowed. This feature can be turned on/off from the upcoming updated version of the RPG Menu which I try to publish next week (whenever the Quest system is ready).

moshroom_rpg_winzone.lua

This script saves the RPG data to a temporary file in the end of a map so it can be reloaded in the next map. Note: 1st person weapons and entity damage counters are not saved.

moshroom_rpg_memoryzone.lua

This script loads the RPG data from a temporary file.

gamedata.lua

This version of the gamedata.lua file saves/load all the tables of RPG Module and my Quest script to/from an additional save file, which creates a compatibility to the official Save/Load system. To use it, replace the gamedata.lua file in your titlesbank folder. It is recommended to backup the original file before doing so. Also make sure that you have the latest versions of the RPG and Quest scripts. Following scripts are currently up to date: All of the store scripts.

Use this version if you use my RPG scripts AND my Quest scripts in your game.

If you don't have the Quest scripts, uncomment lines 20-31 from this file. The reason for this is that the quest_begin script constantly calculates targets for quantitative quests (e.g. kill, collect, destroy) in the background and will return error if the Save Game function redefines the tables between initiating and saving. If you don't have Quest scripts active, the Save Game returns error because the tables aren't defined at all.

I'm aware that this fix has too many steps (1. Read the script 2. Paste it into a LUA file 3. Save it into a right folder 4. If you don't use Quests, edit the file manually) to be regarded easy-to-use. Fear not. I'm going to create a more sophisticated version of the gamedata script as soon as I've finished with the grand update of all the other RPG scripts.

Alternative solution for users without Quest script (and no willingness to edit the script manually). Use the gamedata.lua version provided in this thread: https://forum.game-guru.com/thread/214754

Attachments

Login to view attachments
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Nov 2015 22:42
this is very nicely done, using the AI health to determine hits and such is a neat trick, obviously much nicer to get actual control of those stats but smart workaround none the less!
also nice idea to use the panels on top of the panels to show which is selected, im going to have to steal that
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 16th Nov 2015 22:07
Hi Moshroom, I am interested in your BATTLE MECHANICS Script, you have made a good job of this Script.

Would there be any chance of Including a QUEST Script in this System. If not could you make a QUEST Script
to be used in conjunction with the BATTLE MECHANICS Script ?.

Thanks
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 17th Nov 2015 02:58
That is nicely done.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 17th Nov 2015 07:18 Edited at: 17th Nov 2015 09:35
Quote: "Would there be any chance of Including a QUEST Script in this System. If not could you make a QUEST Script to be used in conjunction with the BATTLE MECHANICS Script ?."

Yes, that's possible and if there is interest, I might start creating one after the RPG Menu and RPG Shop are published. Actually my old "keymaster"-"remotedoor"-pair is already a kind of prototype of a quest system. You can see it here:

https://forum.game-guru.com/thread/213084
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 17th Nov 2015 08:03 Edited at: 19th Nov 2015 06:18
RPG Menu is published in the Asset Store. The script creates RPG Menu where player can access Inventory, Equipment and Status screens. The options screen give player a possibility to change font size, cursor behaviour, set the info text of RPG Menu and Shop Menu on/off and change the style of dialogue in the game.

If this is used alone without my other RPG Scripts, player starts with 5 Healing Potions, 2 High Potions, 1 Boost Potion and 1 Elixir. These can be used through the Inventory. Healing Potion, High Potion and Elixir fill players health up to MAXHP and Boost Potion can add health over MAXHP. Equipment screen will be empty in 3rd person mode and shows the amount of collected weapons in 1st person mode, and Status screen shows players HP (health), state and lives (and the amount of collected weapons in 1st player mode).

If there is an entity with moshroom_rpg_ai_fantasycharacter.lua on the map, in addition to 4 healing items, player will start with 1 of each RPG items, Power Source, Vitality Source, Agility Source and Sight Source that raise corresponding RPG statistics. If player is in 3rd person mode, the equipment window will now be active with possibility to change Weapon, Armor and Accessory. Player will start with 2 weapons, 2 armors and 4 accessories. Status screen will show full RPG statistics and depending on the play mode, Equipment (3rd person) or amount of collected weapons (1st person).

NOTE for users of GameGuru version 1.1: You might get annoyed by the screen flashing black and any playing music restarting every time you close the RPG Menu. This is not an error in the script, but is caused by an alteration of function UnFreezePlayer() in the current GameGuru version. The same happens also in the sample games after the intro screens. I have reported the issue here and Lee has said that it should be fixed in the next update of GameGuru. Patience you must have, my young Padawan.

https://en.tgcstore.net/product/25687

To add items to inventory, you can use my free script moshroom_rpg_collectable.lua. RPG Collectable is modified version of health.lua, that adds collected items to inventory. The collected item is defined by assigning a number between 1-8 as the entity name (1 = Healing Potion, 2 = High Potion, 3 = Boost Potion, 4 = Elixir, 5 = Power Source, 6 = Vitality Source, 7 = Agility Source, 8 = Sight Source).

Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 20th Nov 2015 23:08 Edited at: 20th Nov 2015 23:34
Another prototype of a Quest system...

moshroom_rpg_expdoor.lua

This script creates a door that can be opened when player has enough EXP. Set the EXP limit by changing the 'Strenght' value of the door entity.
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 21st Nov 2015 01:31 Edited at: 21st Nov 2015 01:38
Hi Moshroom, just purchased your RPG Menu Script, where do you attach it, Player, NPC, and usage. Instructions Please, Thanks

just watched your video, should help, also realised I needed the other 2 scripts. Will purchase soon.
PM
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 21st Nov 2015 10:28 Edited at: 21st Nov 2015 10:29
Quote: "where do you attach it, Player, NPC, and usage. Instructions Please, Thanks ... just watched your video, should help"

Yes, the instructions of the store items can be found in the store page. In Menu Script remember to set Always Active to Yes especially if you have large map.

Quote: "also realised I needed the other 2 scripts. Will purchase soon."

I try to write my scripts so that each would also work alone without the need to purchase all of them if you don't want to. Unfortunately the RPG Stats and Equipment only affect enemies that use my RPG AI script (and those are the only enemies that give EXP). I wrote the Menu script so that the menu only shows stuff that are active (example can be seen in the video): if there is no way to collect EXP, the EXP, Level and stats aren't shown, if player is in 3rd person, the 1st person weapon count doesn't show, etc. That's why most content of the Equip and Status submenus is hidden when the other scripts are not in use.

Inventory in the other hand doesn't require any other scripts from the store and works completely out-of-box. To collect items to the inventory, you can use the free collectable script (code can be found in first post of this thread).
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 24th Nov 2015 11:06 Edited at: 24th Nov 2015 11:08
RPG Shop (last piece of the main part of the RPG Module) is published in the Asset Store.

moshroom_rpg_shop.lua

This script creates Shop Menu where player can buy items, weapons, armor and accessory, depending on other scripts used in the game.

If this is used alone without my other RPG Scripts, player starts with 10000 Gold. Items player buys will be used right away. In 1st person mode there are 4 items: Healing Potion, High Potion and Elixir that fill players health up to MAXHP and Boost Potion that can add health over MAXHP. In 3rd person mode there is an additional item Power Source that raises SpellPower of wizard character. (NOTE: This overrides the default Power stat with g_RPG_SpellPower which mean that it nullifies the collected Magic items.)

If there is an entity with moshroom_rpg_ai_fantasycharacter.lua on the map, player starts with 0 Gold. In addition to 4 healing item available in the shop, there are 4 RPG items, Power Source, Vitality Source, Agility Source and Sight Source that raise corresponding RPG statistics. If there is an entity with moshroom_rpg_menu.lua or moshroom_rpg_menu_savepoint.lua in the map, the items bought from the shop are not used right away, but stored into the Inventory for later use. If moshroom_rpg_ai_fantasycharacter.lua as well as the moshroom_rpg_menu.lua are placed on the map and third person mode is active, player can also buy equipment.

https://en.tgcstore.net/product/25686

NOTE for users of GameGuru version 1.1: You might get annoyed by the screen flashing black and any playing music restarting every time you close the RPG Shop. This is not an error in the script, but is caused by an alteration of function UnFreezePlayer() in the current GameGuru version. The same happens also in the sample games after the intro screens. I have reported the issue and Lee has said that it should be fixed in the next update of GameGuru.

The core part of the RPG module is now ready. I'll start building my own game now (an Action RPG, surprise surprise), but I'll also create necessary scripts on may way. Quest system is one thing I'll probably create. Since there has been demand for one, I'll try to create as easy-to-use one as possible so it could also be published. If you are interested, now it's time to post suggestions about possible quest types I should include to it.
science boy
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 24th Nov 2015 11:55
@ moshroom fantastic work, and already sold

but..

will you be adding more to this system like armour class, charm, more spells, maybe a skill list, allignment so certain weapons you can not use, a holy cleric could not yeild a demon axe for example. sorry you opened a huge can of worms

an unquenchable thirst for knowledge of game creation!!!
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 24th Nov 2015 13:18 Edited at: 24th Nov 2015 13:21
Yes, I'm planning to update this every now and then. One big update will probably come when GameGuru engine gets more LUA commands and larger number of parameters become accessible.

Weapon and armor classes are easy to add but as long as player character can't be changed, that would be a bit pointless.

Different spells are probably already possible but they would require their own animations, which isn't reachable by just one set of scripts. One way to add these would be to create an animation first, then a script to control its behaviour and then update RPG menu by adding new submenu for skills.

One possible thing could be to add new states (like slow, blind, weak, clumsy, poison, regen, etc.). That's pretty straight forward and doesn't require any new effects. Then of course I could create skills (accessible from the menu) or at least items that remove or add states. Etc.

Long answer short: Yes.
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 29th Nov 2015 05:38 Edited at: 29th Nov 2015 05:38
Hi Moshroom, finally had a chance to use the three RPG Scripts today, and I was very impressed with the results, it was a touch of genius to be able to pick up various potions by using a number for the entity name, in the entity's description box. With the ability to use many onscreen images in the next version of GG, would it be possible to include a way to have image backgrounds behind the text at sometime ?.

Still hoping for a Quest system in the future.
PM
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 29th Nov 2015 13:23 Edited at: 29th Nov 2015 18:44
Quote: "Hi Moshroom, finally had a chance to use the three RPG Scripts today, and I was very impressed with the results"

It's nice to hear that you've found my scripts useful.

Quote: "would it be possible to include a way to have image backgrounds behind the text at sometime ?"

I originally planned to have a background image for the menu, but I discarded that from the first version so that there wouldn't be a need for additional files to download. I might add that in some point of time. Background image in the panel would be a bit complicated with the current Lua commands.

Quote: "Still hoping for a Quest system in the future."

I did some coding yesterday and here's what I came up with:

https://www.youtube.com/watch?v=bpK2SdoKwt0

So the basic idea of the Quest system is that user places a character entity with quest_begin.lua to the map and assigns a number as its name. After that user can place any "quest" and "reward" to the map and link them to quest_begin by assigning the same number. The quest_begin character talks from file "requestX.dat" in the data folder where X is the same number as the quest. If there is no requestX.dat, the character talks a generic line which vaguely describes the objective (depending on what type of quest). The core is pretty much ready and I think I'll publish the script soon when I've created a couple of new quest types.
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 29th Nov 2015 21:19
The video looks good, hope you have text for Quest Started and Quest Completed as well ?.
PM
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 29th Nov 2015 22:28
Those are easy to add. Currently the character talks requestX + "press E to accept quest" when the quest is not started and requestX + "the quest is currently active" when the quest is started. All the other lines are currently generic only, but I'll make it so that in every occasion generic text can be replaced by a dat file. I just need to figure out some logical way to name the files so that they would be easy to remember but that the folder wouldn't become a mess.
ozziedave
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location: Australia
Posted: 30th Nov 2015 03:35
I've got full confidence that you will sort it out, just one comment I am finding it difficult to view your Video's on Youtube as they are blurred, and I cannot read file names etc, as the only quality is 360p, much better at 480p, maybe because I have a very slow internet connection.

I also find the Action! is the best Video Recorder, there is a free version available, just my thoughts !!.
PM
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 4th Dec 2015 09:30 Edited at: 4th Dec 2015 09:36
moshroom_rpg_battlemessage.lua

This script changes battlemessage from prompt to windowed. This feature can be turned on/off from the upcoming updated version of the RPG Menu which I try to publish next week (whenever the Quest system is ready).

When there is a moshroom_rpg_ai_fantasycharacter.lua on the map do:

1) Place an entity into your map
2) Change AI System:Main to moshroom_rpg_battlemessage.lua
3) Change Static Mode boolean to Off and Alway Active to Yes (if you forget to do this, the game will crash if you fight an ai entity too far from the message entity)

ps. It took me a couple of days to figure out how to do this because when you call a function in Lua, the function stays active as long as the function call stays active. In other words you can't have a timer inside BattleMessage() because there the timer stops running as soon as the main() of the ai moves forward. You also can't have a timer in the main() of the ai, because then the 'defeated' messages will never run because the ai moves to exit() function. You also can't have the timer in the exit() of the ai because it won't run long enough for the message to be readable. You also can't have a while loop to run the timer because that will hang the game and for loop is also unsuitable for the operation. There is a way to create a paraller process in Lua to run whiles in the background, but these would require massive alterations to the main() of the ai script and wouldn't solve the exit() problem described above. Therefore I solved the problem by creating a BMWindow() function that runs from a main() of a separate entity and controlled by global variables from BattleMessage(). I had to do some alterations to the BattleMessage(), but fortunately in GameGuru you can have severeal Lua files with similarly named function without paradoxes. If I've interpreted my observations correctly, if GameGuru detects functions with the same name in more than one Lua files, it always reads one from a file that comes latest in the alphabetic order.

Attachments

Login to view attachments
science boy
16
Years of Service
User Offline
Joined: 3rd Oct 2008
Location: Up the creek
Posted: 11th Dec 2015 20:45
love your work i got the lot. and very happy is there possibly more scripts to combine?? also can you get the inventory icon and picture type for example

http://www.escapistmagazine.com/forums/read/7.828295-Legend-of-Grimrock-2-Shows-Off-UI-Upgrades

the menu bit this is what i hold with hope also if you would like me to design you an inventory image let me know
an unquenchable thirst for knowledge of game creation!!!
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 13th Dec 2015 08:00
Hi. Yes there are more script to come. Next one will be Quest script but before that I have to update the original three because I have made 5 new states, 6 new items and 6 new accessories and a way to override the items lists from files using folder GameGuru\Files\RPG\. My current plan is following:

1: Update Menu, Shop and AI.
2: Quest Script
3: More NPC/dialogue
4: Database editor
5: Skills (?)

Some minor things I'm planning to do in the near future (but not in the next update):

- Mouse support
- Regen state

I might consider some visuals (background image, icons) to, but I just have to learn to use the new sprite commands first. I'll add that to my list.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 13th Dec 2015 19:13
Excellent. Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Mathiasdam
9
Years of Service
User Offline
Joined: 21st Apr 2015
Location:
Posted: 16th Dec 2015 05:32 Edited at: 16th Dec 2015 05:41
Hey Moshroom

I bought your scripts and i am very happy with them!
Would it be posible for you in the future to make it optional to turn on health bars for enemies ? (Could be switchable in your Q menu)
And on another note i don't know if this is posible but i bought some of the animal models from the store (wolves, tigers etc.) But when i give them your script their death animation doesn't work :/

And on a last note a respawn feature for the AI ^^
PM
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 16th Dec 2015 07:17 Edited at: 16th Dec 2015 07:18
Quote: "Would it be posible for you in the future to make it optional to turn on health bars for enemies ?"

I haven't gone through the new sprite commands yet, but I think it might be possible.

Quote: "animal models from the store (wolves, tigers etc.) But when i give them your script their death animation doesn't work :/ "

Are you using savepoint version or non-savepoint version of the menu? My ai script activates ragdoll death if there is no savepoint in the map, but simply makes the enemy disappear if there is one. This is a compromise to make the enemies respawn if game is loaded.

If the entity has a specific death animation, it isn't currently shown, because my ai script is based on fantasycharacter that doesn't have one. I can make a separate version of the ai script for enemies that have specific death animation. Can you link to the model you are using? I can buy it and see what I can do.

Quote: "And on a last note a respawn feature for the AI ^^"

Maybe I could make some chanegs to the RPG ai script so that it will be compatible with smallg:s respawn script. Don't need to invent wheel too many times.
Mathiasdam
9
Years of Service
User Offline
Joined: 21st Apr 2015
Location:
Posted: 16th Dec 2015 15:57
It's nothing important the health bars just thought it would be a cool addition ^^

And i used the one without Savepoint but yeah i think it's because of the custom death animation :/
However the one i tested with was this: https://en.tgcstore.net/product/24332 But i bought like a lot of different animals

Ah i didn't know about that i must admit! But if you decide to make one count me as a buyer! Really quality scripts you've made!
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 16th Dec 2015 18:34
all of dagored's animals use a specific death animation rather than ragdoll, i wrote most of the scripts and can say for most of them they are based on HP rather than using the exit(e) part because after a few seconds it will then clean up the body - i can't remember why but it didn't seem to work automatically at the time.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Mathiasdam
9
Years of Service
User Offline
Joined: 21st Apr 2015
Location:
Posted: 17th Dec 2015 00:55
Oh so it won't be posible to do the death animation with another script ? :/
PM
John Von Draugr
9
Years of Service
User Offline
Joined: 19th Dec 2015
Location:
Posted: 19th Dec 2015 01:25
Moshroom,

I have a couple of questions regarding your RPG scripts. I just got Game Guru and one of the first script packages I saw was yours. They are definitely something I will be needing.

Anyhow, I wanted to ask if your scripts can do the following, or if these are features you might be adding in the future.

1. On player death, have the player respawn at a bind point or a set point on the map, and not just respawn at the spot where he/she died. Also, is it possible to penalize the player upon death by dropping lets say 1/2 of his/her money, and perhaps lose a level or a specified amount of Exp? If possible the ability to set the money penalty and exp penalty within the script would be great for a game designer.

2. Monster Spawner: Is something like this possible, or even already implemented?

A script that would get attached to an object and placed on the map. The script would spawn a monster, or multiple monsters within a set radius. When a monster from that specific spawner is killed, the spawner would begin a countdown and upon reaching 0 (zero) the script would spawn another monster to replace the previously killed one. It would be a nice bonus if a single spawn location could have a small list of multiple character types and then randomly spawn one within the radius area.

Well, I guess that's all my questions for now. As I mentioned, I just got Game Guru but have already gotten comfortable with it and want to start making small mini games to test ideas before jumping in and making a full sized game. I also have to learn the LUA scripting, but that will probably take a bit as I'm not a programmer. I'll go look for a good LUA book or online video trainer on youtube, etc...

John
PM
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 19th Dec 2015 08:29
1. I don't think that's in his script pack, but it's easily done, thanks to the genius of smallg



2. I don't think that is possible, at least not in a straight forward way, there's no spawn system implemented in the engine yet, to make a character spawn currently you have to place it and hide it in the editor, then use lua to cause it to unhide at the right time. I suppose you could do it by placing a lot of characters hidden at that point and using a check to see if the previous one is dead unhide the next after a certain time, but that would not be an endless number of spawns. I think it could also be done by constantly checking the state of the character to see if it's dead, applying a timer then changing its health back to full, that wouldn't spawn it at a random location though it would literally stand up and start attacking again.
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 22nd Dec 2015 20:48 Edited at: 15th Jan 2016 18:31
Quote: "is it possible to penalize the player upon death by dropping lets say 1/2 of his/her money"

Yes. For example:

To use this, make a copy of neutral.lua, rename it and add this code to the main() function of the new script. The name of the main function must be same as the file name. For example if you create penalty.lua, the main function must be penalty_main(e). Assign the new script to an entity with Static Mode set to No and Always Active to Yes.

Quote: "2. Monster Spawner: Is something like this possible, or even already implemented?"

Kind of possible with some limitations. Not yet ready, but I'm working on it.

Quote: "I'll go look for a good LUA book"

http://www.lua.org/pil/contents.html

Ps. I created two new scripts to enable multi-map RPG:s.

moshroom_rpg_winzone.lua

This script saves the RPG data to a temporary file in the end of a map so it can be reloaded in the next map. Note: 1st person weapons and entity damage counters are not saved.

moshroom_rpg_memoryzone.lua

This script loads the RPG data from a temporary file.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 22nd Dec 2015 21:27
Nice. Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Dec 2015 22:17

havent tested it but probably best to check for below 0 hp just incase
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 23rd Dec 2015 07:01
smallg, yes that is better if damage is dealt with some other way than HurtPlayer() command.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 23rd Dec 2015 19:43
Ok, got some things going and want to show how this adds to the game.
Have the RPG SaveMenu, Battle Script, going. Next will be to add the store somewhere. Great Stuff Moshroom.

Incorporated the start of the twitch broadcast Killquest scripts into the level also.

Music by Tarkus1971

Various models from the community and the store. Most have been re textured to have snow on them. Devcore35 Snow.

A decent start to a game. This level takes about 40 minutes to get thru on one level map. Have not even gone into buildings yet for looting and other devious tasks.

The videos are long as it is meant to show how this enhances game play. 40 minutes total.
Part1


Part2


Some interference between the mouse and Third person character when coming out of the killquest menu, But will figure that out.

Enjoy.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 23rd Dec 2015 20:12 Edited at: 23rd Dec 2015 20:27
Very nice. I've been working with a game too, but the process is slow because it has taken time to write all the scripts for it .

Ps. If you want to quickly adjust the level of fireball damage, change the DIV_STR value in the AI script. Lower value -> enemies take more damage. After publishing the first version I noticed that the default defence stat of enemies is a bit high compared to the attack so I did some balancing in the version 1.1 (dropped DIV_STR from 4 to 2 and gave some extra attack power to the weakest enemies).
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 24th Dec 2015 18:31
beautiful work there myke.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 25th Dec 2015 00:57
Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 4th Jan 2016 22:27 Edited at: 4th Jan 2016 22:29
Here's something to improve the 1st person mode compatibility of my RPG scripts:

moshroom_rpg_expweapon.lua

This script creates a 1st person weapon that can be collected when player has enough EXP. Set the EXP limit by changing the 'Strenght' value of the weapon entity.
Rabid
User Banned
Posted: 5th Jan 2016 15:52 Edited at: 5th Jan 2016 15:54
Great scripts Moshroom, just wondering as I think I read somewhere it may be possible to use these with gun play with a bit of work. My games kind of modern day sci fi based, would it be difficult to swap out the fantasy stuff for guns?
Coming to grips with LUA so I'd like to try my hand at modifying them myself so I can learn as I go.

Any suggestions of where I should start? I'd be guessing it would be replacing the fantasy items in the scripts with the appropriate 'military ones' e.g health kit instead of a potion. Level up to unlock ability to use a more powerful gun.
Any chance of an example of how I would do something like the health kit above, just that one item so I can get a grasp on how to then proceed to swap everything else out myself?
Thanks.

edit:
Never mind I had for some reason not noticed the instructions in the top of the scripts. I'll follow those and see how I go.
-i5-3570k - Galax GTX970 - 8GB Kingston DDR3 - Windows 10 Pro 64bit - ASRock Z77 Extreme6-
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 5th Jan 2016 20:32
Thanks again.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 6th Jan 2016 09:44
I'm happy to announce the first version of my Quest script is now published in the Asset Store:

https://en.tgcstore.net/product/26063

If you have questions, comments, etc. about the Quest script, you can use this thread in the Store forum:

https://forum.game-guru.com/thread/214274
grinseengel
9
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 10th Jan 2016 15:36
Hi there. I'm using your scripts for quite a while now and it worked just fine til yesterday. I'm not sure what exactly happend but I'm not able to use the scripts anymore. I've never changed anything but now, whenever I start the game and for example want to use the save point the rpg menu won't show up.

I've already installed steam and gameguru on another pc and downloaded the purchased scripts to see if it works when I'm starting from scratch. Unfortunately, the scripts are still not working.

Do you have an idea how I can solve the problem?

Thank you.
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 10th Jan 2016 20:30
Sounds like the script isn't loaded at all. Open you entity properties and check that the AI system refers to actual file. When I did an update to the scripts I was told to move the lua files from scriptbank\ to scriptbank\Moshroom\. My guess is that you have used the old version in your project and for some reason (e.g. GameGuru update, reinstall, etc.) lost the original files, and now when you redownloaded the scripts, they are stored in a different folder.
grinseengel
9
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 10th Jan 2016 21:24
The scripts are in the right folder. Maybe there's something I don't see.
I've uploaded an image of my entity properties and scripts.

Attachments

Login to view attachments
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 10th Jan 2016 21:36 Edited at: 10th Jan 2016 21:47
Folder name in AI System : Main isn't shown in the screenshot.

Edit: Static Mode should be set to No in order to run any scripts.
grinseengel
9
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 10th Jan 2016 21:47
Moshroom\moshroom_rpg_npc_talking.lua
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 11th Jan 2016 05:23
Ok. Then the only thing I see wrong here is the Static Mode which should be set to No.

If changing that doesn't help, send me your map to palomakijussi@gmail.com so I can do some tests.
grinseengel
9
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 12th Jan 2016 08:14
Ok, is my mistake. Thanks.
grinseengel
9
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 19th Jan 2016 15:05
Is it possible within a map several savepoints to use ? Unfortunately, my attempt was unsuccessful .
Moshroom
9
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 19th Jan 2016 15:24
Unfortunately no, because there isn't a SetPlayerLocation command yet in GameGuru. There is a possible workaround, but it's not yet implemented to the script. How soon will you need it?
grinseengel
9
Years of Service
User Offline
Joined: 27th Jul 2015
Location:
Posted: 19th Jan 2016 17:51
For my RPG game I need more memory points on the map . If they could change the script would be fine.

Login to post a reply

Server time is: 2024-12-22 23:19:07
Your offset time is: 2024-12-22 23:19:07