Coh3n
2010-10-05 23:03:26
This is just something I'm throwing out there for discussion. It's mainly an idea to keep everything organized and clear for both developers and users. Magic.simba has been in the works for quite some time now, and there's really no easy way to implement everything that's necessary.
I'm wondering what you guys think about making the DeclarePlayers script/skill-specific instead of having "Objects", "Priorities", etc. (attributes that are very general). What we have now works very well for the skills we have, but when we get into skills like magic or fighting, things could easily get disorganized and confusing.
This is what I thought of as I was writing this thread, and I'm liking it more and more. A new type (yes, another one!), TScriptSetup, that includes attributes specific to each script.
Pros:
Cons:
You may ask, "How will the user know which attributes to use?" Simple, we tell them. In the Supported Locations thread we have valid arguments for Location, Objects, etc., so why not this? Since they'll be script specific, we can easily add to the thread what the user simply needs to copy/paste into the DeclarePlayers.
I by no means think this will be rushed (unless we all think it's an amazing idea :p). I just want to discuss it and see what people think. Personally, I think it will be well worth it in the long run. Yes, it's a lot of work, but I can do it. Once I'm interested in something, I'll get it done. I'm sure there are several things everyone can do to pitch in also.
So, what do you guys think?
I'm wondering what you guys think about making the DeclarePlayers script/skill-specific instead of having "Objects", "Priorities", etc. (attributes that are very general). What we have now works very well for the skills we have, but when we get into skills like magic or fighting, things could easily get disorganized and confusing.
This is what I thought of as I was writing this thread, and I'm liking it more and more. A new type (yes, another one!), TScriptSetup, that includes attributes specific to each script.
type
TScriptSetup = record
Script : Integer;
Rocks : TIntegerArray;
Trees : TIntegerArray;
FishSpots : TIntegerArray;
AlchItems : TIntegerArray;
Spells : TIntegerArray;
Monsters : TIntegerArray;
Priority : TIntegerArray;
DontDrop : TIntegerArray;
// May or may not be script specific
LoadsTotal: Integer;
LoadsBreak: Integer;
end;
with MSI_Players[1] do // Molly
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := False;
Member := False;
Location := LOC_PS_DBOX;
with ScriptSetup[0] do
begin
Script := SCRIPT_POWER_CHOP;
Trees := [TREE_OAK, TREE_WILLOW];
Priority := [30, 70];
DontDrop := [MISC_BIRD_NEST];
end;
// This would be how to add another script to the player; by default the length of ScriptSetup can be 100 (like SRL's Players array)
with ScriptSetup[1] do
begin
Script := SCRIPT_FIGHTER;
CombatType := COMBAT_MAGIC;
Spell := SPELL_FIRE_BOLT;
Monsters := [DEMON_LESSER];
end;
end;
This would of course require us to create a function(s) to properly manipulate variables depending on the scripts, etc. Or maybe it would just require editing several functions.Pros:
- Much clearer player setup.
- Clearer developing (I think).
- No more multi dimension arrays! Well, there will still be some, but it won't be as bad.
- Will be much easier to introduce new skills/scripts such as questers or gatherers.
Cons:
- Can potentially have a very long DeclarePlayers when multiple script support is added, although I think that's a good trade (ease of setup for length).
- I spent hours and hours getting all the multi dimension arrays to work, now I'm getting rid of it. :p
You may ask, "How will the user know which attributes to use?" Simple, we tell them. In the Supported Locations thread we have valid arguments for Location, Objects, etc., so why not this? Since they'll be script specific, we can easily add to the thread what the user simply needs to copy/paste into the DeclarePlayers.
I by no means think this will be rushed (unless we all think it's an amazing idea :p). I just want to discuss it and see what people think. Personally, I think it will be well worth it in the long run. Yes, it's a lot of work, but I can do it. Once I'm interested in something, I'll get it done. I'm sure there are several things everyone can do to pitch in also.
So, what do you guys think?