Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Hello,
this is a window only API, and honestly I never used it ^^
you can try this https://www.openspace3d.com/scoldoc/_paintwindow.html
_PAINTwindow win; after the last button creation.
Thanks ill try rhat. What does os3d use to make tab behavior and what .pkg files are required for that?
hello everyone I am having problems building an app with the tabs api (posted to : https://redmine.openspace3d.com/project … tabs.html)
the scol code is from that page on redmine:
var A = 3;;
fun cbTabChange (obj, u, i)=
_fooS strcat "tab " u;
_fooS strcat "new tab selected : " itoa i;;
fun cbSize (o, tab, w, h)=
_DELtab tab 2;
_APPENDtab tab strcat "number " itoa A;
++A;
0;;
fun main ()=
_showconsole;
let _CRwindow _channel nil 300 50 800 600 WN_NORMAL "test tabs" -> win in
let _CRtabExpand _channel win TAB_SHOWN -> tab in
(
_fooS if tab == nil then "TABS NOT CREATED" else "TABS CREATED";
_ADDtab tab "number 1" 0;
_ADDtab tab "number 2" 1;
_ADDtab tab "number 3" 2;
_SETtabSelected tab 1;
_SETtabPadding tab 10 20;
_CBtabChange tab @cbTabChange "changed";
let _CRwindowInTab _channel tab 0 WN_CHILDINSIDE -> child in
_CRbutton _channel child 5 50 250 200 0 "BOUTON CHILD 0";
let _CRwindowInTab _channel tab 1 WN_CHILDINSIDE -> child in
_CRbutton _channel child 5 5 250 200 0 "BOUTON CHILD 1";
let _CRwindowInTab _channel tab 2 WN_CHILDINSIDE -> child in
_CRbutton _channel child 50 50 250 200 0 "BOUTON CHILD 2";
_CBwinSize win @cbSize tab;
0
);;when scol runs main(), you don't see the buttons in any of the tabbed windows at first.
you have to switch from the first selected tab window to another to see the buttons in the tab windows. so if tab "Number 1" is selected when you run main, there is no button. when you switch to tab "Number 3" or "Number 2", you will see buttons in those tabs, and if you switch from either of those tabs back to "Number 1", you will see the button there. It seems that you have to change a tab in order to start seeing buttons anywhere, whatever tab is selected first as per the code.
1. is this due to the beta nature of the api?
2. is there a workaround?
3. do i have to use the
thanks for your input!
I have posted the .scol and .pkg files here
-Dan
hello everyone:
In returning to scol programming i've been posting queries to chatgpt...it can approximate scol syntax but it isn't exact.
are their any ai's out there that could be trained on all the docs posted to rhttps://redmine.openspace3d.com/?
-Dan
Os3dtools.pkg have several functions to read or write csv data
hi i tried this but the interpreter is not compiling i'm sure i'm missing something elementary. here is the relevant csv file
here is the relevant code...i'm rusty i know! (the textfile.scol, textfile.pkg, tools.pkg (copied from C:\Program Files\Scol Voyager\Partition_LockedApp\tools\os3dlib) and monsterfile.csv files are in openspace3d/textfile
fun main()=
_load "textfile/tools.pkg";
_showconsole;
let _getpack (_checkpack "textfile/monsterfile.csv")-> csvfile in
let readCSVdata csvfile "," -> [firstelement tail of list] in //i just want to see if i can read head of return value from readCSVdata and will write code to read from rest of list later
let (hd firstelement)-> datalist in
_fooSList datalist;
0;;I am able to read the csv file and load it into a string but I don't know how to get the correct return to use the CSV parser / writer api
so this works and puts the output into a text file which reads:
hit dice,up to 1-1 hit dice,1-1 hit dice,2-3 hit dice,Over 3 hit dice
armor class,,,,
-10,20,15,8,6
0,15,7,8,2
10,10,3,3,1here is the scol code...so i can get the csv file into a string, but not into a form that I can use the CSV parser / writer api with:
fun main()=
_load "textfile/tools.pkg";
_showconsole;
let _checkpack "textfile/monsterfile.csv"-> csvfile in
let _getpack csvfile-> csvfile in
_storepack csvfile "textfile/monsterfileoutput.txt";
0;;-Dan
i am thinking reading csv files would make data entry easier than hand coding if i have, like, 300 pages of this...as per my other post lmk how i can load a csv file into scol and I'll figure out the api functions posted to redmine...it doesn't appear that you have integrated csv functions into a plugit unless i am missing something
behold a scan of the game I would like to automate, from when I was 12 years old:
thanks you didn't have to do all that!
I did have some problems understanding it but no need to explain it to me...I think it will be easier just to read csv files as that would make the data entry faster, as per my post below let me know how i can do that when you have time.
-Dan
Hello! and welcome back
Scol tab can only handle one type.
If I understand correctly you want to search a value from 2 index.
The col name and the first raw value ?what you can do is to:
- make a name list of the col names matching the col index
- get the index from the name to search in datavar sHeader = ["armor class" 0]::["up to 1-1" 1]::["1-1" 2]::["2-3" 3]::["Over 3" 4]::nil;; //typeof data = tab tab I;; // create data from row index list (-10)::0::10::nil fun makeData(lrowindex)= let (sizelist sHeader) -> headersize in let sizelist lrowindex -> nbrows in let mktab nbrows nil -> ndata in ( //create row with default 0 value let 0 -> i in while (i < nbrows) do ( set ndata.(i) = mktab headersize 0; //set row index value let nth_list lrowindex i -> index in set ndata.(i).(0) = index; set i = i + 1; ); ndata; );; fun setArmourClass(data, name, level, value)= let switchstri sHeader name -> hindex in let sizetab data -> tsize in let -1 -> ret in let 0 -> i in ( while ((i < tsize) && (ret == -1)) do ( if (data.(i).(0) != level) then nil else ( set data.(i).(hindex) = value; set ret = 1; ); set i = i + 1; ); ret; );; fun getArmourClass(data, name, level)= let switchstri sHeader name -> hindex in let sizetab data -> tsize in let -1 -> ret in let 0 -> i in ( while ((i < tsize) && (ret == -1)) do ( if (data.(i).(0) != level) then nil else ( set ret = data.(i).(hindex); ); set i = i + 1; ); ret; );; fun main()= //set data = makeData (-10)::0::10::nil; let makeData (-10)::0::10::nil -> data in ( setArmourClass data "up to 1-1" (-10) 20; setArmourClass data "1-1" (-10) 15; setArmourClass data "2-3" (-10) 8; setArmourClass data "Over 3" (-10) 6; setArmourClass data "up to 1-1" 0 15; setArmourClass data "1-1" 0 7; setArmourClass data "2-3" 0 3; setArmourClass data "Over 3" 0 2; setArmourClass data "up to 1-1" 10 10; setArmourClass data "1-1" 10 3; setArmourClass data "2-3" 10 3; setArmourClass data "Over 3" 10 1; _fooS strcat "1-1 : " (itoa getArmourClass data "1-1" 0); _fooS strcat "Over 3 : " (itoa getArmourClass data "Over 3" 10); _fooS strcat "up to 1-1 : " (itoa getArmourClass data "up to 1-1" 10); ); 0;;output is :
1-1 : 7
Over 3 : 1
up to 1-1 : 10I think you or I inverted "1-1" and "up to 1-1" order
the console wouldn't start up until I used the voyager to open advanced>control panel, then I ran the hello.scol script, which opened a control panel window. I pressed "Console" , which showed the output on the console. I shut that instance of the voyager down, and now when run hello.scol, the console is displayed. good enough for me!
it's been so long I've forgotten some basics
I installed os3d on my computer from https://www.openspace3d.com/downloads/O … d%20Editor
I set the setup>:maintenance window in scol voyager to enable logs files>all, and I checked all the boxes except for "list scol extensions and allow the cache the choice between the full mode or minimal mode", which was greyed out
I set my antivirus program, webroot secure anywhere, to "allow" Scol.exe in C:\Program Files\Scol Voyager
I created a folder named "hello" in the Partition_LockedApp and in the Partition_LocalUsr and put the same two files, hello.scol and hello.pkg, in both of these folders in the "hello" folder.
hello.scol reads:
_load "hello/hello.pkg"
main ""
hello.pkg reads:
fun main()=
_showconsole;;
Windows is set to automatically open .scol files with Scol.exe in C:\Program Files\Scol Voyager
When I click on hello.scol, nothing happens. Any pointers?
the files are here
Thanks!
-Dan
nevermind i found the file on one of my backups, but it would be great to have it up at the new redmine location for other users. i can share on request.
hi everyone...Iri (Hi! I hope all is well) or Arkeon or anyone else...can you email me this file or post it to redmine:
thanks man I'll take a look at this!
I think the more labor saving method eventually will be to read csv files.
I'm happy to be doing this work again!
-Dan
hello everyone:
I'd like openspace3d to draw a hexmap, with three levels of detail (and much more, but I'll start with that). The map would allow the placement of a 2d sprite on it, and openspace would be able to determine where the sprite is (in terms of something like an index number for the hex cell) at the smallest, medium, and largest size of hex.
But to start, how would I use the function _BTDRAWline to draw one hex that is 1000 by 1000 pixels? (I'll start with that). I'd like to use openspace3d to do this as I think it would be easier than building up a whole interface with scol and the more basic 2d libraries but I am open to suggestions. The project will be 2d only.
Here is what I'd like to use openspace (or scol coding,if that is easier) to draw and associate with a struct that references the hex and a coordinate system. (For the present, the coordinate system could simply be a single Integer.) Ignore the shading of the hex I couldn't figure out how to make gimp leave out the shading.

hello everyone
i would like to use the mktab command to create this data structure:
S S S S
I I I I
I I I I
I I I I
Some of the I's in the first column will be negative, some positive. this data structure could use the mktab command since it will never change in size.
1.would this be an example of creating the table structure?
typeof array = tab [S I r1];;
2. let' say that this would be the contents of the table structure, what would the initialization of the structure look like?
"armor class" "up to 1-1" "1-1" "2-3" "Over 3"
-10 20 15 8 6
0 15 7 3 2
10 10 3 3 1
3. I would like be able to access specific instance of the integers (I) depending on the input of (S) [reflecting the top row] and I [reflecting the instances of I following the first row, in the first column).
//psuedocode
Prototype find_integer [S I] I;;
fun find_integer(S I)= // S is one of the strings in the first row, and I is one of the Integers in the first column, starting in the second row
//code block here, to return an instance of I starting after the first column and starting after the first row
;;
// for example find_integer ("1-1", 0) would return 15
//find_integer ("Over 3", 10) would return 1
//find_integer ("up to 1-1", 10) would return 3
It's been a few years since I've used scol and I am a bit rusty!
Thanks!
-Dan
ps fwiw, 10 years ago I tried to create a scol based player to work on android devices...it was just too much work for me to handle, dealing with bazillions of hardware issues that never end.
my present project is to create an assistant to help run dungeons and dragons games based on the first edition from the 1970's....keeping track of lots and lots of integers, and perhaps storage, creation, and access to 2d maps, to be instantiated with a touch screen table for the players and access to what the players see (and don't see) running on the dungeon master's own device. so some database stuff and network stuff so that parts of the game can be visible on multiple devices, perhaps remotely as well.
I think a simple shortcut would be
1. turn the new string element into an S r1 list like this where String_element is a string and Lfirst_list is an [S r1] list:
2. join old list to new list sing os3d list function lcat (p ,q )
3. return old list+new list
fun add_to_end_of_list (first list, String_element)=
//step 1
let String_element::nil-> last_list in
// step 2
lcat Lfirst_list last_list;;I'll try this when I have time.
thanks for that ++ insertion Iri.
A question...is there a way to add an element to the end of a list as opposed to the beginning (I've done some looking on redmine to see if the function is in one of the libraries but haven't found it):
If I change
set list = element::list;to
set list = list::element;scol throws an error, I assume because I am adding an element that comes after the end of the tail of the list, which is nil.
(!) Line #11:
list??;;
>>> ERROR - Type mismatch (detail):
Found: fun [S [S r1] I] [S r1]
Expected: fun [[[r1 r1] r1] [r1 r1] I] [r1 r1]I'm also curious as to what:
Expected: fun [[[r1 r1] r1] [r1 r1] I] [r1 r1]means. r1 states the type of recursivity. how can you have recursivity of recursivity? i thought recursivity is only a property of elements, such as S, I, F, user_defined_struct, etc. But recursivity of recursivity? I'm mystified. Sounds like something out of Godel's Theorem.
a list of any objects with a tuple of coordinates instead of string
yes that would be a great idea for creating endless cities. something where you create a grid of square shaped So3 scene nodes (randomly drawn from an array different meshes, all formed so that they can seamlessly join to one another), resize if needed, and then go explore, something like a less spectacular version of 4'10" of this (made with non realtime mandelbulb...https://www.youtube.com/watch?v=PWMTDRWJqu4 )
long time (for me) and no coding, my brain has been getting out of shape
I've been thinking about how to build a grid of objects in scol, starting (and perhaps ending) with strings in the system console.
This code has two functions.
The first function takes a string element S , an integer I specifying how many times the element is to occur in a list, and returns a list of strings: S R1
proto make_string_list = fun [S [S r1] I ] [S r1];;The second function takes a list of strings S r1, a multiplier, which counts how many individual strings are to be printed to the console before the console begins writing a new line I, and returns an output string S, which is a grid of the strings written with multiplier I strings per line:
proto build_line_return_string = fun[[S r1] I I S] S;;Here is the whole package. I figure this could be done in os3d to build grid like structures for fps games or, if the input of each element is varied, to build grid like city structures:
proto build_line_return_string = fun[[S r1] I I S] S;;
proto make_string_list = fun [S [S r1] I ] [S r1];;
fun make_string_list(element, list, iterations) =
let 0 -> counter in
(
while (counter < iterations) do
(
set list = element::list;
set counter=counter+1;
);
);
list;;
fun build_line_return_string (list, multiplier, counter, output_string)=
//end of list, return full string
if ((hd list)== nil) then
(
output_string;
)
else
//not end of list yet
(
if ((mod counter multiplier)==0)
then
(
//add head of list to end of string, add line return since we are at a multiple of multiplier that
//determines line length and
//feed tail of list and changed string back into function
set output_string= strcatn output_string::(hd list):: "\n"::nil;
set counter = counter +1;
build_line_return_string tl list multiplier counter output_string;
)
else
(
//add head of list to end of string followed by a space, feed tail of list
//and changed string back into function
set output_string = strcatn output_string::(hd list)::" "::nil;
set counter = counter +1;
build_line_return_string tl list multiplier counter output_string;
);
);;
fun main()=
_showconsole;
let make_string_list "vv" nil 100-> string_list in
_fooS build_line_return_string string_list 2 1 nil;
0;;If it's of any comfort, ISIS' days are numbered.
1. Never attack France, the U.S., and Russia at the same time. Bad idea
2. These attacks signal a wounded animal. The v1 and v2 attacks started when Hitler knew the game was over.
Not so comforting:
Ideologies like ISIS act like a great attractor to sociopaths everywhere. Hopefully when their paradise is destroyed their attractiveness will dwindle.
Are you guys, friends, and family ok?
Hello,
on android you only have one window (the one created by the system)
for OS3D it's used to bind the 3D buffer on it. and then use 3D overlay bitmaps for HUDWe are currently looking AT QT library to make much better windows support, first for IOS and Raspberry pi port and then latter for android if it works as expected
going ot...does the scol vm on android have any interoperatbility functions (i.e. like sharing the url of the .pak to other apps or launching other apps, and vice versa)?
I updated parts of the .xml file, editor and client. The update places padding between the throttle handle and the top and bottom of the throttle itself, so the handle doesn't move to high or two low. The -.1.0 to .1.0 values are adjusted taking into consideration the padding specified by the user.
I haven't coded the touchpoint behavior into this, so the adjustments just work with a mouse.
This is more or less like a slider control, where 0 is at the middle and the values go up or down from there. I think I will take some options out of the editor (such as the hover/active states)
Uses: moving a handle up and down and making numbers move from 0.0 up to 1.0 and 0.0 down to -1.0.
I plan to put in more options (swapping from left to right or vice versa. maybe making an option to make the throttle horizontal instead of vertical.
Iri I have taken your advice and have broken down some functions into smaller parts so several functions can call on a common function.
It makes things less confusing, but I see where whiteboards come in useful.
Hello,
on android you only have one window (the one created by the system)
for OS3D it's used to bind the 3D buffer on it. and then use 3D overlay bitmaps for HUDWe are currently looking AT QT library to make much better windows support, first for IOS and Raspberry pi port and then latter for android if it works as expected
i see...so the only 2d gui on android atm the bitmap widget is the only way of conveying text information?
Hi !
At which api do you think ?
Hello...
The non os3d graphic api.....how iOS and android handle the equivalent of windows...the "pages" you shift between in those os's since you aren't using a floating window interface.
I think sometime over the last few months you mentioned some new term that is polymorphic and returns a string representing the type of an object.
colleagues:
are there any plans on updating api documentation?
answer at your leisure.
-h
good work!
-h
Vive La Republique!
http://www.cnn.com/2015/12/14/europe/fr … ond-round/
Maintenant, nous devons faire la même chose aux États-Unis d'Amérique en 2016 que nous avons notre propre style du front national candidat et mégalomane, M. Trump.
Le fascisme n'échoue jamais de nourrir sur la peur, n'importe quel pays.