Random enemies and turn based duel system

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
Juicy
Member
 
Joined: Fri May 20, 2016 11:50 am

Random enemies and turn based duel system

Postby Juicy » Thu Jan 05, 2017 7:58 am

Hi,

I'm making a text-based game using interfaces. Trying to get the feel of the old MUD games, if theres people familiar with the days before the intenet :roll:

Im trying to figure out what would be the best way to have the player encounter an enemy. My game is heavily influenced by Legend Of The Red Dragon, or LORD for short. So theres a forest thats full of baddies. I thought id set it up somehow in levels, the deeper you go into the forest, the nastier things go. But how to start a fight, i thought id just make a script that has a random branch that chooses one from a group of enemies belonging to that level. Seems to work fair enough when i tested it with just messages saying enemy1 to enemy3. But how would i then go creating the stats for the separate enemies. Using variables?

And how would i implement the battle system? i noticed some topics about turn based battle, but cant really find a solid explanation on how its done, and would it be different since im using only interfaces.

Stumbling in the dark here.

User avatar
priest865
001 Subscriber
 
Joined: Tue Jul 15, 2008 2:00 am
Location: Hiding Underground

Re: Random enemies and turn based duel system

Postby priest865 » Fri Jan 06, 2017 4:54 am

I am not familiar with mud games but I think for enemy data you could use tables. One table for all the possible enemies and one table for the current/instances of enemies the player is facing. Maybe you gonna need a third table for encounters/troops. When an encounter starts you put all the ids of enemy groups/troops matching the (less then or equal) player level in a collection and then generate a random number between 1 and the size of the collection. You get the id of the encounter with "nth element in collection". You then put the enemies/troops referring with this id in the current encounter table.
Image

User avatar
Gamerdude
001 Support
 
Joined: Wed Dec 12, 2007 8:56 pm
Location: Australia

Re: Random enemies and turn based duel system

Postby Gamerdude » Fri Jan 06, 2017 5:02 am

Yeah that's pretty much how I'm doing it. Works pretty well :)
Image
Image

Juicy
Member
 
Joined: Fri May 20, 2016 11:50 am

Re: Random enemies and turn based duel system

Postby Juicy » Fri Jan 06, 2017 5:21 am

Thanks for the replys, seems like i get to start studying how tables work then.. ive dreaded this day :)


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron