Pink Petal Games

Game Discussion => General Discussion & Download => Topic started by: Uriel on February 25, 2010, 09:15:35 AM

Title: Cases in the .itemsx files
Post by: Uriel on February 25, 2010, 09:15:35 AM
Is there such a thing? I thought of adding some items that will have effect only if girl has a certain trait, or her skill is enough...
Title: Re: Cases in the .itemsx files
Post by: Samu on February 25, 2010, 10:23:29 AM
the current version doesnt support that, maybe in the 1.30 once it gets published.
Title: Re: Cases in the .itemsx files
Post by: Solo761 on February 25, 2010, 03:38:20 PM
I'm not sure if that was even planned.
Title: Re: Cases in the .itemsx files
Post by: zodiac44 on February 26, 2010, 12:59:14 AM
I don't think it was ever brought up for items, but it probably wouldn't be too hard to implement.  I just don't see the value yet.  Items are essentially useless in their current incarnation, so I'm not inclined to add new features to that don't fix the inherent uselessness.
Title: Re: Cases in the .itemsx files
Post by: DocClox on February 26, 2010, 08:23:15 AM
Never occurred to me, I must admit. The itemsx format is currently a straight translation of the old .items file format into xml.

As for adding cases ... the tricky bit is the expression parsing. It'd need to set up a parser that could handle logical and arithmetic expressions. We'd also need to grant at least read only access to a number of the games internal data structures.

All of which sounds like a script rather than a data file to me. So I'd say the way to go is to attach a script to the item (can't remember whether the triggers format currently supports that or not, but I think it does) and do the logic in the script.

I'm still planning on adding a Lua scripting engine to the game at some stage, so that might help as well.
Title: Re: Cases in the .itemsx files
Post by: zodiac44 on February 26, 2010, 11:47:12 AM
Rather than a hybrid approach, would it be easier to have items written entirely as scripts?

I really think this needs to be back-burnered, though, until we fix the item system.
Title: Re: Cases in the .itemsx files
Post by: DocClox on February 26, 2010, 02:49:15 PM
Rather than a hybrid approach, would it be easier to have items written entirely as scripts?
Well... one popular use of Lua is to implement config files, it'd be doable. On the other hand, there are advantages to XML: an awful lot of programs can import/export to XML these days, and the static XML format should cover 99% of all items. My instinct is to save the scripting for the odd cases where the standard effects don't fit.

I really think this needs to be back-burnered, though, until we fix the item system.

Oh, to be sure.
Title: Re: Cases in the .itemsx files
Post by: Fstop on February 26, 2010, 07:24:59 PM
Why don't we just make it so items (equipable mostly) allow you to go over the 100 limit cap It would make it slightly more used
Title: Re: Cases in the .itemsx files
Post by: zodiac44 on February 27, 2010, 01:24:29 AM
The fix I proposed is skill/stat (capped at 100) + bonuses from items (capped value determined through testing) + bonuses from traits (capped value determined through testing), which makes traits and items that affect skills and stats have some value in the game.