Scripted actions

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

The list of actions is also becoming a huge mess. It might be time to rethink the whole action system (scripting language *cough*)
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Hmmm, don't charge GG too much ! :wink:

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 :lol: )
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 :P
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

That's not scripting! That's just common sense.

Scripting is creating a cool programme that automates creating a complex mechanic like an ore store : )
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Common sense ?

Well I prefer the graphical way. At least it doesn't feel like I'm debugging a damn C++ source file...

But I agree that something more automatic would be cool.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

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.
Tonari
Craftsman
Posts: 146
Joined: Sun Jul 23, 2006 1:32 pm
Location: Japan

Post by Tonari »

New option given to the edit display of action is surely convenient.
Direction, status, character, party, and monster, etc.
Please forgive poor English.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

... What?
Tonari
Craftsman
Posts: 146
Joined: Sun Jul 23, 2006 1:32 pm
Location: Japan

Post by Tonari »

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.
Please forgive poor English.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

<Many actions aren't as simple as this though, each one is made on the fly - I think you will find the pulldown menu might not be as intuitive
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

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)
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.
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.

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 :oops: 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)
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

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.
This is what I meant.

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.
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

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
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Actually to start with GG should state what internal functions with what variables are getting called, and from that list of common functions see if there are any holes or see if the functions would need overhaul (well, duplication then overhaul) to be more flexible to your proposed list
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

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
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.

Editable spells are something else that I'd like to see, too, of course. :wink:
User avatar
Joramun
Mon Master
Posts: 925
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

It is not necessarily a spell : what about dragons / throwers ? they don't cast a spell, do they ?

But I suppose we have to wait for some feedback from GG about all those ideas.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Joramund wrote:It is not necessarily a spell : what about dragons / throwers ? they don't cast a spell, do they ?
Yes, they do.

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.
Post Reply