Droid Engineer Archive

Thread: The droid programming language (first draft)

CastorStablescraper
Fri Sep 19, 2003 5:29 pm
#40

Couple things from above:

how do you copy/paste?
This is easy, done through the keybindings. Look in the "chat" bindings in your keymaps.

This reminds me of ...
Yes! I had also had similar thoughts about programming droids using macro commands. This totally reminds me of Robotwars, or Corewars, or any number of other things. The clincher would be if running scripts actually went at a SPECIFIC RATE, such as 5 commands per second. If you write something long, it will be added to your attack speed.

Do we want people to get reputations?
Of course we do! The whole purpose of single-character-servers is to develop reputations and responsibility for your actions. You bring yourself a rep, and you either live with it, fix it, or recreate. This would really make apprenticeships work, too.

Now my own method of doing this, since we're already dreaming:
  • Limited number of subroutines, based on the level of the droid's module. Normal drive module would max at a small-ish number, and there would be a cluster module version that'd take up a cluster slot and provide more instructions.
  • State table available for all AI states. You can bind a subroutine to one or more states. Examples:
    1. Called from datapad
    2. Detected something nearby
    3. Detected hostile (would trigger on red monster/player)
    4. Under attack!
    5. Entered peacemode
    6. Moving, peacemode
    7. Light/Medium/Heavy Damage
    8. Low power
    9. etc.

  • Add certain '/' commands (some of these might already exist), such as:
    1. /moveto x,y
    2. /movedir dir distance
    3. /moveto waypoint_name
    4. /callstate state from above
    5. /ui action selectlastattacker
    6. /ui action cyclehostileoutward (skips non-hostile creatures)
    7. /setsurveytool resource
    8. /recharge
    9. etc.



    This way you can use the '/' commands to actually do something with the bot. Emotes and messages (/say, /shout) will be completely disabled on non-talking droids, and those that talk will lose power whenever talking through this method -- large amounts of power if yelling or shouting. (Definitely don't need spambots flying through town endlessly.) No variables are needed... but you get states and a few good /commands. Hopefully the server code for state generation is already there.

    There should also be a fairly difficult or expensive-to-make disk copier, made by DE's. The disk will always show the original creator. You may quit the game, but your programs may continue!

    Lastly, ALL DE's could do something useful.

    Novice: can program routines for "Called from datapad" and "Entered peacemode". Each level of production would add another programmable state. Any states you can't program will use the standard AI default like returning fire, and running when heavily damaged.



    ---
    Itsa Trap, Master Droid Engineer (Kauri)
    the Knights who say Ni, Kauri (http://www.knights-who-say-ni.com)

    Knights who say Ni Factory Outlets: /waypoint -3375 75 (Naboo/Caerbannog)
    Itsa's Evil Island Fortress: /waypoint 1052 -4268 (Corellia/Coronet)
CapnSteve
Fri Sep 19, 2003 10:36 pm
#41

First, yes the language is based on Perl and Visual Basic (I haven't tried .net though) .


My main concern with the language itself was making it pretty easy to learn, even for those with no programming experience whatsoever, but still able to run a fairly advanced program. For instance, a newbie could make a simple droid that heals its owner and calls for help when attacked. A veteran could program a droid to check his harvesters, count the number of faction members per city, record what anyone says about him, and then come back to defend a faction base. I'm sure there would be simple programs for sale, and there could even be default programs that run if there's no drive installed. So far, no one seems to have had much of a problem understanding it, what does everyone think about the difficulty level?




--------------------------------------------------------------------------------

(Kauri) Indur Dawndeath - Master Droid Engineer / Smuggler (0,4,1,0)
(Chilastra) Indur Dawndeath - Creature Handler (3,3,1,1) / Smuggler (0,0,3,0)

"Next thing you know it's going to require a Droid Brain in order to make an Electronics GP Module. Sheesh." --Kollos
Zolandar
Sat Sep 20, 2003 12:09 am
#42

make that 3 scriptable areas


the 3rd being for when an error is enountered. Such as the droid cant reach those coordinates, it can't drop anything at a location, it can't retrieve anything at a loction


and in this case $droiderror could be a special string that can be used in that area


example: it tries to reach the coordinates specified but an agressive creature is at those coordinates


/tell $owner $droiderror, returning home
/goto(0,0) #home location
/exit


it would say something like


failed to reach coordinates line 5, returning home


or if it couldn't drop something


failed to drop inventory line 10, returning home

Knives10
Sat Sep 20, 2003 6:59 am
#43

I realy like this idea, though I am only a novice programmer. It would be nice to have all of your availiable commands that you can program in a new tab on the ctrl+a menu



Allucard Hellsing
Master Teras Kasi
Master Swordsman
Master Brawler

Leedon
Sat Sep 20, 2003 8:10 am
#44

While you've done aexcellent job presenting this idea, and this looks to be like the way it should be, I REALLY don't want to spend my time putting all that in to make my droid useful. I haven't programmed in8 years and I don't regret leaving that line of work for my current one for a moment. Imagine having to do that for every droid. How long does it take for you to make a custom droid now? Now tack the time it would take to do this, even with copy and paste. Now tack on the time it would take to test it to make sure it works before you give ti to the customer. Nowthink abouthow much this droid would be worth in credits to you vs the person you're selling it to(who didn't sit and type all the code out and wouldn't understand how much work you you put in because it's not "tangeble"). I would have to quite being a DE, which after reading my post of me disagreeing with you, you're probably thinking "no big loss", but think of how many other DE's we'd lose. If making a droid was like this, it would stop being like a game. It would stop being like a game even for the people who like to program eventually. Everyone who has the patience to make a droid at that point would soon dread the next order they get that isn't seekers.


Ilove making droids. I like that better than when my friends take me to Dantooine to help me with my marksman. Ilike when I have a satisfied customer. If they aren't satisfied, I like fixing the problem so they are, even if it means buying parts I can't make from another DE. I like these things because they're fun for me. I'd like to assume that that's why those of us that haven't quite DE are still around. It's my opinion that this would take a good portion of the last of us out. That's a lot of orders for you that are left to fill. How long until you get tired?


-Lee


PS. Who here has played with RM2k(or RPGM2K, I don't remember)? The coding system in that wouldn't be too bad for this, but still long. Anyone who wants to make this viable may want to look it up and play with it.

Sixtyasheron
Sat Sep 20, 2003 10:08 am
#45

This would be cool, I'd love to see it in a ghetto type visual basic style scripting.


As for everyone not being able to do it, I think thats the point, to rely on others. SOE Gives us our limitations, and ours lists of commands, such as


You can use 30 subs and 2 class modules (i believe thats what they are called, havent VB'ed in a long time) for the first level of droid, and you have access to the following commands (command list). Now sure others will be more advanced with their skill levels, but thats why the droid's programming (at compilation) would check your active skill level. Either way, id like it done in vb / C style, VB more so, because its so easy to pickup

Knives10
Sat Sep 20, 2003 3:35 pm
#46

Yeah I think it should be in VB code. It should work kinda like in VB where you start to type in the code and a list of commands would pop up and as you typed it would narrow it down(text1.[list of commands]=). That way even the non programmers could pick up the commands they could use.



Allucard Hellsing
Master Teras Kasi
Master Swordsman
Master Brawler

radiant_saracen
Sat Sep 20, 2003 6:31 pm
#47

This wont be implemented, why? Database size for one, think of all the people coding away 20,30,40 or more lines of code. Each disk willprobably take up morespace than any object in the game. Also the script will have to be *run* on the server. Could be buggy etc...


An adaptation of that (very cool) idea is for DEs to make pre-programmed disks. Maybe even placing several in a droidto add functionality. Eg.


A maintain harvester program


A heal owner program.


A goto target and listen program.


and so on...

Knives10
Sun Sep 21, 2003 10:05 am
#48

They better put it in, we could actualy be worth something then.



Allucard Hellsing
Master Teras Kasi
Master Swordsman
Master Brawler

CapnSteve
Sun Sep 21, 2003 2:24 pm
#49

I never thought about the database, but you're right, storage concerns seem to be behind a lot of things in this game. It seems ridiculous that a few kb per person would overwhelm such a huge company, but oh well. I do like the preprogrammed disk idea. Anything to add a little usefulness to droids.



--------------------------------------------------------------------------------

(Kauri) Indur Dawndeath - Master Droid Engineer / Smuggler (0,4,1,0)
(Chilastra) Indur Dawndeath - Creature Handler (3,3,1,1) / Smuggler (0,0,3,0)

"Next thing you know it's going to require a Droid Brain in order to make an Electronics GP Module. Sheesh." --Kollos
Knives10
Sun Sep 21, 2003 4:15 pm
#50

Yeah, these are some of the richest compnies in the world and they don't have enough speed and storage? Sounds wacked!



Allucard Hellsing
Master Teras Kasi
Master Swordsman
Master Brawler

FekAltor
Mon Sep 22, 2003 8:51 am
#51

That would add a year to my future in SWG. Sounds like a whole hell of a lot of fun programming different droid applications for myself and other people. Excellent ideas steve, I'm praying the devs consider this.



If a dev happens to read this and think "nahhh, too many people would be uncomfortable with writing actual sourcecode in a game" - wrong wrong. I would have oodles of fun and would be far more than happy to write droid programs for other people. Would certainly give some point to half the skills droids can have - hell, you could even make custom quests by using a droid as your static npc(s).



One of the perhaps easiest ways the devs could implement a type of this would be to allow the owner to give the droid a set of in-game style macros, but IMO that would definately not be enough. While your idea is complex, steve, and because of that the devs might skip much of this or entirely - I would think that if we were to be able to program droids, we'd need to be able to have loops, condition testing, variables, etc. to make it worthwhile (and would expand the level of fun!).




/hugs steve =)



and for fun:


http://binarydemons.com/strike/screenShot0249.jpg <--- this is a droid engineer friends house... yikes




ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ /// This signature is undergoing serious revamp. Come back later ///
ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
ZZZZZZZZZZZZZZZZ
Allabacca
Mon Sep 22, 2003 9:26 am
#52

Does anyone remember an old unix game from the 80s hacker culture called crobots? Where you "built" combat robots by writing code in a scripting language similar to C, then pitted them against each other in an ASCII arena and watched them fight?


Or the old Xwindows (unix) game Xtank, where you wrote code to define a tank, then fought in a graphical environment?


Because anyone who's played either of these games will instantly realize the insane amount of depth that CapnSteve's idea would add to the DE profession and the entire game in general. And then, just as instantly,will want to jump off a bridge whenthey realize that if SOE can't even fix the ability to make a blue R2, there's pretty much no chance that this beautiful, deeply elegant idea will ever see implementation. It literally makes me sick to my stomach.


But thank you for all the time and effort you put into this idea, CapnSteve. Folks like you are pretty much the only thing appealing about DE to me anymore.

Page 4 of 7