Suggestion - choosing properties : (was common properties)

Started by Kennedy, Sun 17/08/2003 01:55:12

Previous topic - Next topic

Kennedy

Would it be difficult to allow users to specify common properties that all entries of a certain type have?
For example inventory items may all have the common property of mass and volume.
If you're making an rpg you may want to give all of the characters the common property of hitpoints.
Specifying common properties for all enties in a certain type would be easier than having to add that property to each entry in that particular type.
Then when the programmer creates a new entry it would allready have the common properies specified for that type.

EDIT :

Sorry, I got it figured out now.
I see that when you add a property it automaticly is added to all entries in that category.
I guess maybe I should have instead asked for maybe an option to allow the user to choose which properties an entry has from a list?

evilspacefart

#1
i'm against asking CJ to make the change in the editor, so here's an alternative.
you can run a loop and set the property value over and over to a default number

while (mycounter<5) // loop ends when mycounter ==5
{
SetCharacterProperty (mycounter, HITPOINTS, 100); // default is 100
mycounter +=1;
}

just make sure to add the HITPOINTS schema at beggining with type set as NUMBER.

mind me, i'm not a good coder, so i apologize for sloppy code, but it helps to at least make a little effort before asking for a complete global change.
cheers,
~esf

Captain Mostly

Is adding something like a HITPOINTS schema very basic (i.e. will I find "adding schema's" in the read-me?) As it'd be a useful thing for me to know how to do.

just in case it's NOT very basic:
could someone explain it please!

evilspacefart

#3
it is pretty simple actually. it's also in the manual. (look up "custom properties")

if you go to the character or room or objects, etc. screen in the editor, if you click on the properties button, it will take you to the schema editor. Right click to make a new schema. name it anything you like.

Kennedy

Maybe instead of having the properties be automaticly added to every entry in that cetegory there should be an option to choose which properties an entry has from a list.
For example a key might have the property "unlocks" that sets which doors it can unlock.
All keys would have this property, but something that is not a key would probably not have this property.
Likewise a door in a room then might have the properties "open", "locked", and "key".

Or maybe there could be an option to make that property unique to that entry?
For example only a radio would have the property "frequency".

Pumaman

I appreciate the suggestion, but I think that would be over-complicating the properties.

If a property doesn't apply to a certain item, then just don't set it to anything.

I'm not sure it's worth to effort to implement a way of hiding properties on specific items.

SMF spam blocked by CleanTalk