Page 1 of 1

Macro Facility

Posted: Wed Mar 03, 2004 7:08 pm
by Paul Stevens
From an RTC forum:
You can also use an external program to create a macro that repeadtley
presses mouse1 for you, so you can leave it training and make coffee
I think it would be relatively easy to make an "internal"
macro facility for CSBwin. It could even be responsive to
the monsters/objects/Mana/Stamina/etc. Perhaps
macros could be called up using Control Keys. CTRL-A would
call a file named Macro_A.txt, for example.

I don't know how complex such things could be but it would
be interesting to make a start. A macro to pick up an object,
throw it, and repeat until stamina, food, or water gives out.

Any ideas about this? What mightit be useful for?

Posted: Wed Mar 03, 2004 7:44 pm
by beowuuf
Can only see it as a training aid really

Re: Macro Facility

Posted: Wed Mar 03, 2004 8:12 pm
by sk
Paul Stevens wrote:From an RTC forum:
I don't know how complex such things could be but it would
be interesting to make a start. A macro to pick up an object,
throw it, and repeat until stamina, food, or water gives out.

Any ideas about this? What mightit be useful for?
Extend that idea to a scripting interface so we can make our own DM bots .)

Posted: Wed Mar 03, 2004 8:20 pm
by Paul Stevens
Well, since I don't know what a "DM bot" is I cannot say
whether this would be easy, possible, difficult, or what.

Can you give an idea of what such a 'script' would look
like? A complete, though simple, example? And what
it is supposed to accomplish?

Posted: Wed Mar 03, 2004 9:03 pm
by sk
Paul Stevens wrote:Well, since I don't know what a "DM bot" is I cannot say
whether this would be easy, possible, difficult, or what.

Can you give an idea of what such a 'script' would look
like? A complete, though simple, example? And what
it is supposed to accomplish?
I meant an interface to do scripts that can command champions as a player can.

example
sub cast_spell(spell_to_cast, champion_color) {
# .. code that makes champion of champion_color to cast
# .. spell_to_cast
}

And means to creat logic when to call such functions (AI). I guess the mouse driven ui would make this difficult.. this really was just a quick idea, i have absolutely no clue if this even is possible. Picking things up etc would be a problem i guess.

Well, anyway, that is what i meant.

The ultimate idea would be to create a script that can finish DM or CSB :)

Posted: Wed Mar 03, 2004 9:23 pm
by Paul Stevens
Yes. That is exactly what I was proposing. Except that
the macro "PlayEntireGame" is going to be difficult for
you to write. Not difficult to provide the tools and hooks
to make writing it possible. And who knows? If the game
can be played in 20 minutes perhaps some clever person
could write a script (or macro) to play a significant part.

By the way. Such scripts exist. We called them 'Movies'
and they were written by actually playing the game.

Posted: Wed Mar 03, 2004 10:20 pm
by Guest
Paul Stevens wrote: By the way. Such scripts exist. We called them 'Movies'
and they were written by actually playing the game.
Yes i know. AI is still different than a human played game.

Posted: Wed Mar 03, 2004 10:22 pm
by sk
Anonymous wrote:Yes i know. AI is still different than a human played game.
This was me. I still seem to forget to check if i'm logged in or not.

Posted: Wed Mar 03, 2004 10:26 pm
by cowsmanaut
not sure if this helps at all but Maya and XSI (3d modeling software) have their own scripting languages based on programming languages XSI is easier to follow I think since it uses vbscript or Java script for it's functions which are over all easier than Maya's Mell which is based on C++ coding. Anyway, the way in which they make it even easier for the user is that for every action that is commited a log is produced which contains the code for each function. an example of this code is as follows

Code: Select all

CreatePrim "Cube", "MeshSurface"
SetValue "cube.cube.length", 18.245
SetValue "cube.polymsh.geom.subdivu", 9
SetValue "cube.polymsh.geom.subdivv", 9
so to follow this it's creatign a primitive shape which is calling cube, the "meshsurface" means it's a polygons surface. Then gives it a set length I asked for then the number of subdivisions in the U and V directions.

so, what about something like this but related to DM isntead of polygons and such.

Code: Select all

castspell (3,3,0,0) char1
sleep dur=00.01.00
select item"apple" char1, loc18
consume item="apple", char1
select item="falchion", char1, loc3
place item="falchion", char1, loc15
I dunno something like that? so the cast spell would be 3rd character pressed twice which is 3rd power light spell yes? the 0 indicates nothing pressed. so number 0-6 represent the icons.

sleep dur .. sleep is command dur is the duration hours:mins:seconds so it calculates when you are woken and then places the duration of sleep.

select item then the name of the item char1 is chatracter 1.. other options could be floor or alcove.. the location number (loc15) reffers to the location of the object in the storage heirarchy however that's set up in DM.

you get the idea I guess from the rest.. just some thoughts..

moo

Posted: Wed Mar 03, 2004 11:11 pm
by Paul Stevens
cowsmanaut:

In order to be useful (IMHO) there must be conditional
constructs. Instantly you have a much more complicated
language. You have to be able to say things like:

Code: Select all

IF MonsterAt(0,0)  //(0,0) relative is directly ahead
  IF Mana(green) is greater than 20
  THEN
    CastSpell(Green,zo,kath,ra)
  ELSE
    IF Mana(Blue) is greater than 20
    THEN
      CastSpell(Blue,zo,kath,ra)
    ELSE
      TouchHand(Blue,Left) //Cursor known to be empty.
      Punch(Blue)
      TouchHand(blue,Left) //Put item back into attack hand
    ENDIF
  ENDIF
ENDIF
Or the equivalent with Curly Braces and some sort of
commenting ability.

Posted: Fri Mar 05, 2004 5:25 pm
by Lunever
Doesn't even need to be that complex. I imagine I'd be quite happy with a macro that makes the 2 front fighters attack, then immediately following releases spells (shoots fireballs) from all 4 characters and finally "reloads" the artillery i.e. creates MonFulIr runes for all 4 characters...

Posted: Fri Mar 05, 2004 6:57 pm
by Paul Stevens
That should be relatively easy to do. Give me a few weeks
(I am currently rather excited about this Pocket PC project)
and let me make such a macro as a very special case. Not
with a script language but as a special case. Just to test
the feasibility of processing macros at runtime and to give you
a feeling of how it might work while playing a game.