Scripted actions
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Hmmm, don't charge GG too much !
Making a scripting language would quite a big work !!
Besides, I think making the existing system clearer would be enough.
(at least for 0.44 )
Like some hints / comments to know what things do in the editor.
And if you really want to script, edit the dungeon.txt in the notepad
Making a scripting language would quite a big work !!
Besides, I think making the existing system clearer would be enough.
(at least for 0.44 )
Like some hints / comments to know what things do in the editor.
And if you really want to script, edit the dungeon.txt in the notepad
- Sophia
- Concise and Honest
- Posts: 4239
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Joramund, you misunderstood what I meant.
Editing the text file has nothing to do with what I was talking about. I was talking about scripted actions, as opposed to the complex mess of special case actions that current exist, and constantly having to pressure George to add new ones. The current action system is full of lots of very similar actions, special cases, and so on. It's a mess.
I was speaking of actions only, and most people could probably get by without ever having to touch them. For people who knew what they were doing, though, they would be highly useful. If you didn't want to mess with them, you'd use the current set of actions that exist and the graphical editor, just like now.
Editing the text file has nothing to do with what I was talking about. I was talking about scripted actions, as opposed to the complex mess of special case actions that current exist, and constantly having to pressure George to add new ones. The current action system is full of lots of very similar actions, special cases, and so on. It's a mess.
I was speaking of actions only, and most people could probably get by without ever having to touch them. For people who knew what they were doing, though, they would be highly useful. If you didn't want to mess with them, you'd use the current set of actions that exist and the graphical editor, just like now.
For instance, the pull-down menu that exists in condition of relay is made in the edit display such as attack method.
Monster, party, character, item, tile, and grobal, etc. can be chosen from the pull-down menu written, "Opby".
Air, hand(reft,right), floor, infront, forward, north, object, clockwise, body, and local, etc. can be chosen from the pull-down menu written, "Target".
The list will come to see easily if the unnecessary one is removed from the list of action by this.
Monster, party, character, item, tile, and grobal, etc. can be chosen from the pull-down menu written, "Opby".
Air, hand(reft,right), floor, infront, forward, north, object, clockwise, body, and local, etc. can be chosen from the pull-down menu written, "Target".
The list will come to see easily if the unnecessary one is removed from the list of action by this.
Please forgive poor English.
May you we should specify something clearer about what you mean by scripted action. Would it include also trigger, counter and relay mechanics ?
It could also mean splitting the huge amount of action in a definite set of functions that would allow to do almost everything you want.
It can represent a lot of work if those function are not already present in the RTC code, or are present in an unadapted way (like the fact that the function inserting objects into the dungeon looks for ninja skills)
Also , my previous confusion was probably due to my misunderstanding of what is at the core of RTC mechanics : why action target a type of object and not a single instance of an object etc.
I used to do adventure maps for some strategy game with a good editor, the design was very different :
You could assign a single object to a variable, and thus apply action only on this object, or trigger on global events like "an object is destroyed", or "an object is created", and check conditions over the specific object involved in the event (it involved a special temporary variable called "triggering object") before doing actions
The whole system in fact generated a script, and you could also write it as script from the start.
(the game is w*rcr*ft 3, the script is called 'jass', a particulalry inelegant name)
It could also mean splitting the huge amount of action in a definite set of functions that would allow to do almost everything you want.
It can represent a lot of work if those function are not already present in the RTC code, or are present in an unadapted way (like the fact that the function inserting objects into the dungeon looks for ninja skills)
I don't even know in what language RTC is written, and how difficult it would be to make a script interpreter in any case.George Gilbert, Sat 26 Aug. RTC Editing -> Creating new spells wrote: the code that "injects" standard items into the dungeon (whether created by a spell or thrown by hand / attack method etc) does have hardcoded into it that the ninja level (not XP, because it might be modified by items worn etc) effects the distance thrown / damage done.
Also , my previous confusion was probably due to my misunderstanding of what is at the core of RTC mechanics : why action target a type of object and not a single instance of an object etc.
I used to do adventure maps for some strategy game with a good editor, the design was very different :
You could assign a single object to a variable, and thus apply action only on this object, or trigger on global events like "an object is destroyed", or "an object is created", and check conditions over the specific object involved in the event (it involved a special temporary variable called "triggering object") before doing actions
The whole system in fact generated a script, and you could also write it as script from the start.
(the game is w*rcr*ft 3, the script is called 'jass', a particulalry inelegant name)
- Sophia
- Concise and Honest
- Posts: 4239
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
This is what I meant.Joramund wrote:It could also mean splitting the huge amount of action in a definite set of functions that would allow to do almost everything you want.
Right now the actions system is based around a very large number of mostly similar actions designed around special cases. There are separate actions to create objects on the floor, in the hand, in the mouse hand, etc., and swap actions with similar scopes, and so on. Still, there are gaps: how does one take an object off the ground and send it flying through the air, for example? I am proposing to break down the action system into simpler building blocks.
What about a list :
Action_damage (options : location, base damage, random part, "tag" where tag could be custom or "blunt", "fire", "sharp", "magic" etc. and then ticking the allowed targets : party, char 1,2,3,4, front, back, monster, door etc.)
Action_teleport (item/party/monster)
Action_set_property (modify attribute of item/party/monster)
Action_trigger_all (location + activate/deactivate/toggle etc.)
Action_trigger_target (target + activate/deactivate/toggle etc.)
Item_create (options : object type, unique id/ number, location : ground, inventory, monster droplist, flying, with corresponding options like velocity etc.)
Item_move (same as before but using an existing object)
Item_swap (swap two existing objects)
Item_replace (swap existing with a created object)
Action_create_light (location/attachment, intensity, expiration time, decrement speed)
Maybe some things are missing, but as an example a fireball spell would in fact create a projectile, not different from any item. That projectile would then on "break" end, trigger actions :
-Object_create "Fire_Cloud"
-Action_damage Location(here), Amount(X,Y) Tag: "Fire", Target: Party,Monster,Door
Action_damage (options : location, base damage, random part, "tag" where tag could be custom or "blunt", "fire", "sharp", "magic" etc. and then ticking the allowed targets : party, char 1,2,3,4, front, back, monster, door etc.)
Action_teleport (item/party/monster)
Action_set_property (modify attribute of item/party/monster)
Action_trigger_all (location + activate/deactivate/toggle etc.)
Action_trigger_target (target + activate/deactivate/toggle etc.)
Item_create (options : object type, unique id/ number, location : ground, inventory, monster droplist, flying, with corresponding options like velocity etc.)
Item_move (same as before but using an existing object)
Item_swap (swap two existing objects)
Item_replace (swap existing with a created object)
Action_create_light (location/attachment, intensity, expiration time, decrement speed)
Maybe some things are missing, but as an example a fireball spell would in fact create a projectile, not different from any item. That projectile would then on "break" end, trigger actions :
-Object_create "Fire_Cloud"
-Action_damage Location(here), Amount(X,Y) Tag: "Fire", Target: Party,Monster,Door
- Sophia
- Concise and Honest
- Posts: 4239
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
A fireball is just a spell-- the damage and the creation of a cloud is part of its own inherent conversions. It has nothing to do with the action system.Joramund wrote:Maybe some things are missing, but as an example a fireball spell would in fact create a projectile, not different from any item. That projectile would then on "break" end, trigger actions :
-Object_create "Fire_Cloud"
-Action_damage Location(here), Amount(X,Y) Tag: "Fire", Target: Party,Monster,Door
Editable spells are something else that I'd like to see, too, of course.
- Sophia
- Concise and Honest
- Posts: 4239
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Yes, they do.Joramund wrote:It is not necessarily a spell : what about dragons / throwers ? they don't cast a spell, do they ?
I see where you're confused, because there is something unclear in the terminology used by RTC. You're thinking of a "spell" as a sequence of runes that is cast, which it is but a "spell" is also a type of object-- a fireball, a des ew, etc. flying through the dungeon are all objects of the type SPELL.
Thus, a dragon or a wall shooter shoot a SPELL_FIREBALL object-- the same type of object created by the party's fireball incantation.