Aller au contenu

Photo

VGE - Question: How do you want to work with script problems?


  • Veuillez vous connecter pour répondre
14 réponses à ce sujet

#1
CID-78

CID-78
  • Members
  • 1 124 messages
Because that is exactly what most script does. It do a task of some sort. I am a developer so my approach is quite logical, and involve divide and conquer. But what i really need to know is how do other people want to solve the problem/task. What is the ideel input method for you guys, especially for you that don't know how to write a script.

I can of my hand think of two ways of feeding in the information.

1) the Logic flowchart ie pseudo scripting. You don't have to care about syntax and can use blocks of code. But is this easy enough? If you know how todo this it's just learning the script syntax and you have reached the whole way.

2) the second method is object oriented where each involved object has it's own flow and relation to each other, and the program take care of which order these must appear in the script. ie you start with a empty knowledge pool and then fetch objects, that you can check for conditions, manipulate, and give orders to.

I probably need to explain them more in detail for you to grasp the full picture. How would you like to work with scripting? except the read my thoughts and write the script kind of button. That is beyond my skill as a developer.

Please describe your dream input system. if you want a can describe the two above system in more details.

Please take your time and think about this. while i am working on the heavy under the hood mechanics that must be in placed before i can give you a shell that manipulate the beast underneath.

#2
CID-78

CID-78
  • Members
  • 1 124 messages
added a poll for how you want to manage your project files. if you ask MicroSoft it obvious that i should put them in My documents but I am not sure if that is what people really want. sometimes it's not a bright idea to have everything in the same place.

http://social.biowar...76/polls/22481/

#3
pizzapicante

pizzapicante
  • Members
  • 122 messages
I like the way the scripting of the toolset works ( I think ) but sometimes I have found that the "help" of the toolset is pretty much useless and I have to look for the correct way to implement a function because the toolset wont give an example or the example it gives is either confusing or incorrect, I think.

#4
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
uhhhm...

normally, i doodle a picture. and then i kinda branch it off like a conversation/flow chart, but not as strictly.

for example...

(doodle of a box) (doodle of a stick figure pointing at the box)

stick figure: i click the box.
box: do i know this guy?
---yes: give him a goodie.
---no: take down his name and credit card number (or whatever)
?does he give the credit card number?
--yes: stick him up for a few thou.
--no: give him a lollipop consolation prize.
?does he attack the box?
--yes: play dying animation



(this is in no way reflective of ANY script i have ever written. it's just being humorous!)

does that make sense? does that help WHATsoever!?!?!?!?

#5
CID-78

CID-78
  • Members
  • 1 124 messages
well the pool obviously got screw up. I can only blame myself for using "<" and ">" on a webpage.
The question was where i should save the VGE project files.

1) in My documents\\VGE\\<Project Name> (like Microsoft would like me todo)

2) in <VGE Install dir>\\Project Name> (like the old fashion application did)

3) in folder of choice (good for those that use subversion like SVN)

4) in folder of choice\\Project Name (similiar to above put make it's own folder to be sure there is no conflict or that you risk saving over other project files

#6
CID-78

CID-78
  • Members
  • 1 124 messages

pizzapicante wrote...

I like the way the scripting of the toolset works ( I think ) but sometimes I have found that the "help" of the toolset is pretty much useless and I have to look for the correct way to implement a function because the toolset wont give an example or the example it gives is either confusing or incorrect, I think.


well the project is about making scripting easier and in some cases faster, I doubt i can beat a fast typer that don't do typos.

Syntax is going to be gone. you will not beable todo a script that you can't compile, but you can still do a script that do nothing or things you didn't intended it todo. so it's not fool proof.

#7
CID-78

CID-78
  • Members
  • 1 124 messages

BloodsongVengeance wrote...

uhhhm...

normally, i doodle a picture. and then i kinda branch it off like a conversation/flow chart, but not as strictly.

for example...

(doodle of a box) (doodle of a stick figure pointing at the box)

stick figure: i click the box.
box: do i know this guy?
---yes: give him a goodie.
---no: take down his name and credit card number (or whatever)
?does he give the credit card number?
--yes: stick him up for a few thou.
--no: give him a lollipop consolation prize.
?does he attack the box?
--yes: play dying animation



(this is in no way reflective of ANY script i have ever written. it's just being humorous!)

does that make sense? does that help WHATsoever!?!?!?!?


sound a bit like the object oriented relationship layout, (to make above script you would then do below:

*You have a script on a Box (Container placeable)

From the beginning you only got one object in the upper center of the graph. (the Box or OBJECT_SELF)

You select it and pick GetCurrentEvent() from the toolbox. The graph will now add a child to OBJECT_SELF that is the Event. (so you now got two object the Box and the event)

You right click on the event object and choose Filter->All (it adds a switch and grabs all know values from a event list)

The VGE expands the Event with children for all possible events that can accure on a Box. among these are onAttack and onClick.

You select the Onclick node, right click and select Fetch->EventObjects (ie depending on what type of object it is I can add diffrent common options ie for event this seem like somthing you want to beable to do.)

The node will branch with all types of object that triggered the event such as the person who clicked it.

You then select the object that represent the the clicking creature, 

from here you go do things diffrently depending on how you define "know the person" and how you store that information.

#8
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
wait... events are objects?

i'm working in second life scripting now, and that is event-driven. is that the same as object-oriented???
i dunno, i always thought i was doing flow charts. lol!

oh, the poll... i go for #4. if the user can decide, then they can decide to stick it in documents or they can put it where it really goes :X (since bioware and the toolset co-opted the documents directory, that's... where i do my toolset work, anyway.)

#9
CID-78

CID-78
  • Members
  • 1 124 messages
events are structs which is a public object. So yes they are objects most things in software are, even things without a physical abstraction.

I program is usually both object oriented and event driven. unless it's a hardware then you might have a interrupt driven system that isn't object oriented. for example a alarm system in a car.

what I meant by object oriented flowchart with relation is that you won't need to care about the order things happen. (obviously the deeper nested a relation is in the chart the later it will accure in the script aswell)

In a standard flowchart, you put things between Start and End, and must make sure everything in relation to each other is located in the right order. it can look really messy if you have a script do alot of things.
this method would basically mean that you got a line from start to end, without anything attached from start.

you then drop "objects" onto that line, so you first create a event Variable in the Variable form.

after that you drop GetCurrentEvent() on the LIne and Drop the Event Variable in that object to tell it to store the value in that variable.

like you can see it's as scripting without typing, not very fast or newbie friendly. it's very easy for scripters to pick up. The aim was to get nonescripter the power and I am not convinced that that is easy enough.

You must still understand the Logic of scripting, which is what differ a good scripter from the persons that never seem to grasp how you make your own scripts. (ie they can only copy and paste and tweak existing scripts), I hope to get the last group in the loop aswell.

#10
CID-78

CID-78
  • Members
  • 1 124 messages
*current plan on how it will work:*

the visual script panel is the right half of the script form. the left is the regular text based script that you are used to see in a editor but it's write protected. (I don't want the mess that comes out of user input into the picture), However it will import regular scripts, but it won't allow you to manipulate them as text when they are in the system.

the header contains the standard drop down with all the scripts functions.

When the Script object is in focus the Left Show the whole script and the right Visual Part show the include/reference structure of the script. (the current script in centered and highlightened) with all includes above it and all references below. which will expand in their turn.
(the whole include and reference structure is handled under the hood, and as a user you never need to think about what files you need)

when you select a function object, the left show the function only and it's description. the right visual part goes into editing mode and draw up the object hiearchy and relations chart.

The whole panel will be surrounded by the function block ie, you got a header display a function image and it's Name.
below the header you got all the parameters as objects including OBJECT_SELF

ie there is atleast one object attached to the upper end of the inside of the function block and that is OBJECT_SELF.

the object are attached with lines to the header block and surrounded by a circle, which is the sign that it's fully connected.

if you start adding your own variable they will be added next to these but they will not connect to the header block, unless they are added as parameters. instead they will be floating at the top until they are dragged down by a connection.

Here i was thinking about allowing certain variables like Objects to appear bigger then small variables like int and floats, showing their importance relation to the user.

in the lower end of the visual script panel you got either nothing (void function) or if it return something you got a variable attached to the function foot.

so a void function will look like a line chart system that never reach the footing, while a function that return something as atleast one connection from the top to the bottom.
obviously the space between the foot and the header is almost unlimited in either direction.

the general idee is that input comes from above and output goes out below. Lines will allways move downwards forceing object to "sink" and spread out to make room.

*Regular line is ordinary connection ie a direct connect. (it might have arrow going in the connection direction)

I will try to avoid having lines overlapping but they need to beable to cross each other. parallell lines will be common.

*Operator will be hubs that allways has a spare connection. ie "+" operator is created with one input connection already made (left operand) and with a free empty (right operand) and a empty output below. when the user add something to the free input slot, the hub is expanded with another empty optional slot. if you drop in an array it will sum the array unless you add a index. if the left operand and the output variable is the same it will create the shortcut "+=".

*Function calls without a parameter will be assumed to belong to OBJECT_SELF and will originate as a Fat connection line from it with the function symbol attached to it. it will connect to the Variable in use with a regular line.

*Function call with one or more parameter will be assumed to belong to the first object/struct parameter or if no object/struct exist to the first parameter independent of type. (This will be something you can alter function by function, if the result isn't what you prefer.) This information is used to help the user to find the functions he is looking for. ie when a "event" is selected event functions will be close at hand and you don't have to sort through a list of function that doesn't deal with events.

all input parameters ontop of the function box and the return parameter at the bottom. if the function is a custom made there will also be a expand button on it. which basically open up the function inline and show it's guts.it will push thing up or down and allow lines to go under the open function.

if,switch will be semi automatic, you can create them manually but more often they will be created as a cause of your actions.

for,while,do while loop will be handled automatically when working with arrays and lists. There will be ways of making them appear manually but most of the time you won't need to worry about them. They will work like functions (ie having a inner container) that can either be expanded or closed.

did i forget something?

Note that the flowchart isn't order dependent unless it's linked together. so the script will dynamically move parts around to make them fit. ie if it doesn't matter in which order two variables are fetched, the order is handled by the software not by the user. (normally it's the order they where added) but if the user adds another link the order might change, without you seeing anything in the visual interface. you will however allways see it in the text output.

So what do you think so far?

#11
Yara C.

Yara C.
  • Members
  • 242 messages
Great, CID. Very appealing for me. Not what I have expected...(BTW I had voted for # option 4)

And I count to those who only copy & paste and tweak existing scripts. Although I think I still understand the logic of scripting with various -and passionate- scripting experiences in my past. Focussed on cutscenes, learning more about level design etc. I really have no mind to spend time on catching the paradigm of a new scripting language...no need for what I am doing currently with the toolset.

But reading your post I got a feeling of flashing long forgotten passions. Interest! A tool which could ease the learning curve, would not subtract too much time from my main interest - that opens new opportunities!
Reading in the beginning "but it won't allow you to manipulate them as text when they are in the system." I thought "What? What?!" I want to switch and manipulate reaching a certain point.

After I have read the rest of your description I could understand this decision very well. No need to do this. A lot of things not to care about as user. So far I can still see the script...LoL

That´s what I think so far. (And that I will wave when time will be ripe for beta-testing)

Modifié par Yara Cousland, 26 juillet 2011 - 08:35 .


#12
LazyDaisy

LazyDaisy
  • Members
  • 35 messages
Hi CID. Now that I have actually worked with a script in the toolset, I've given this some thought and have some ideas. I really like the visualized 'object' and relationships approach (i.e. direct connect line). It sounds similiar to looking at the relationships within a db and that makes a lot of sense to me. I do have a big request though. For us script-impaired users out here, would it possible for the tool to suggest or prompt the user to pick the next most logical script object (obviously giving free rein but maybe highlighting the probable next object you should deal with). For example, if I have just made an object that specifies a "store" could the tool prompt me to use the script that defines which .utm I want it to use and then prompt me to define if I have a specific .utc that I want to use? That seems like a big ask, sorry. But, when I copy/re-write existing scripts I can see exactly what I need to do (get pc, get object, list coordinates, get the stuff that goes with it, check to see if it exists, etc) and it all makes logical sense - but if I wasn't looking at an existing script I would probably miss most of the required elements. Or could this be achieved by having some pre-existing common scripts (with associated visual objects) in the system that the user can modify using the tool?

You are my hero for taking on a project like this. No, really.

LazyDaisy

#13
CID-78

CID-78
  • Members
  • 1 124 messages
well here is how I Intend to do is keeping lists/filters. There is no CreateStore() function only CreateObject so what you will have is a drag and drop list of all blueprints. There is no way i can now that the user want to create a store object.

I am have database connection on the the todo list so i can give the tool more information.

However I will give the user tha ability to specify what a "object" really should be ie
if you make a function called RestockStore(object oStore, int nItemCategory) for example.

The starting state would be oStore can be ALL types of objects and Int is a number of some sort.
However if the person creating the script libary want he can select those parameters and narrow the selection. ie add demand that the oStore is a Store object and nothing else. and link the int to a list of constants he has made.

And the tool will prevent the user from calling the function with other values.or in some cases make them valid. ie autoadd a check to see if the object the player drags into the slot is a Store object.

Most of these "learn the tool what todo". is something I add to make sure the tool can be expanded, I prefer to have my software to be dynamic rather then hardcoded. So when I get the pieces in there i will also ship it with "My knowledge of Dascript". however if I made a bad call somewhere it can be corrected by the User or community. (I will patch it but that may take time). The User can if he want clear the whole Intellisense and start from scratch.

Now this doesn't sound very newbie friendly but the ideé is that the user should get tool should get access to the communitoes knowledge. So when a newbie load up a "community library" it will be preset with how the function should be used, the newbie shouldn't need to worry about it. Only look at all the nice Icons Seryn has and is going to make. And pair them together.
In some cases the community might want to add their own icons representing their own objects aswell. So i need to allow it to load these kind of resources aswell.

All of this is what make this beast hugh and it will take time before I have gotten it all up and running.

Modifié par CID-78, 29 juillet 2011 - 07:08 .


#14
LazyDaisy

LazyDaisy
  • Members
  • 35 messages
The autoadd check should do the trick. At least a newb would be able to tell if they are putting in something that won't work. That would make the user go out and find the correct type thereby helping to learn the context of the code and the toolset.

#15
CID-78

CID-78
  • Members
  • 1 124 messages
Yes i just need to get the structure right.the list must be sorted in variable type containers,

(Variable Type)->(List Name)->(Entry) which would also become equal with

(User defined Struct)->(2DA Name)->(Entry)

ie Everything would be treated as arrays of values either in one or two dimensions.

The Library scripter must also beable to define 2DA columns into Lists on their own, So you don't need to make list copies if you only want to read one entry out of a table instead of a row.

the variable type is automatic, The list/2da is a option that can be added to the filter mechanics and the third is user input.

A class maker that produce the functions and struct required for utilising the Tables would also speed up the process. Allowing you to build more complex system fast. I will however put this on the list that shouldn't be in the first version but at a later release.