ID:174048
 
OK two questions that I can't find answers to that kind of lead to a third...

1. How do I make it where the host of my TextMud can create items and be able to create a description as well that shows up when clicked on?

2. How do I make it where hosts can make stats show up in a person's stat panel, like, well... in my TextMud game I'm making, I'm making it where the stat panel starts blank. How do I make it where I can create a stat by any name, then add a number or something to it. And would there be a way to make it where the numbers can be automatically used in a AI controlled combat system instead of having to roll a dice?

3. How do I make it where GM can view people's stats and items at any point in the game?
Blueseed15 wrote:
OK two questions that I can't find answers to that kind of lead to a third...

1. How do I make it where the host of my TextMud can create items and be able to create a description as well that shows up when clicked on?

Create a procedure that creates items and sets descriptions that you can add to the client's verbs. (I prefer putting host/admin verbs in client, because you never know when your client might switch mobs if you have that effect in your game.)
verb/add_verb()
verbs+=/proc/item_create
proc/item_create()
var/type=input("What type?")in typesof(/obj)
var/obj/O=new type(mob.loc)
O.desc=input("What is it like?")as text
obj/Click()
usr<<desc



2. How do I make it where hosts can make stats show up in a person's stat panel, like, well... in my TextMud game I'm making, I'm making it where the stat panel starts blank. How do I make it where I can create a stat by any name, then add a number or something to it. And would there be a way to make it where the numbers can be automatically used in a AI controlled combat system instead of having to roll a dice?

You cannot create variables at runtime, but you can use an associative list to work the same way. (All variables are keapt in the vars list anyway, you just cannot manipulate that list.) Have a text string for the name of your stat in the list, (this string will be used like the stat variable.) and have that string equal the number, object or whatever.
var/stats[]=list()
verb/add_stat()
var/stat_name=input("What sort of stat?")as text
var/type=input("What sort of stat?")in list("Number","Text")
var/stat=input("Set [stat] to what?")as text
if(type=="Number")
stat=text2num(stat)
stats+=list("[stat_name]"=stat)

To access those stats, do it just like any other associative list: stats["hp"]

3. How do I make it where GM can view people's stats and items at any point in the game?

Have a variable that keeps track of who the person is viewing, and in Stat display its stats if it is not null. (I will give an example using the aforementioned stat system since you will most likely be needing to display those stats.)
var/mob/view_stats
Stat()
if(view_stats)
statpanel("[M.name]'s stats")
for(var/stat in M.stats)
stat(stat,M.stats[stat])
In response to Loduwijk
OK, one quick question that decides the fate of my game... is it possible to have the host be able to set up an AI combat system while in game?
In response to Blueseed15
Blueseed15 wrote:
OK, one quick question that decides the fate of my game... is it possible to have the host be able to set up an AI combat system while in game?

I guess so, but you'll need to design it and the AI settings. I never actually tried that yet.