@psytechnic:
Quote
I'm sorry to hear you're having a difficult time with my program,...
Oh, please, no, I think you misunderstand. I do not find your program at all difficult, I think it is a well thought-out and nicely polished app, and I find it both easy to use & useful. I was simply trying to explain that I don't use it in quite the way you might expect, and therefore you should NOT take my opinions as representative of those you want to share it with.
When I experiment with Stranded, I am trying to learn the scripting language, and use what I learn in creating/modifying existing definitions/scripts to my own ends. In the course of that, I may alter values from the formats usually found in the 'plain vanilla' mod. This may/may not result in an error when I test the change in-game. If the game chokes, I revert to the original format. If the game accepts it, but the Viewer chokes with an 'unhandled exception' error, I let you know, because I believe you want & deserve such feedback.
Generally, I use the Viewer as a database reference, when I am trying to balance weights, quantities resulting from combos & actions, etc. Usually, the debug functions in Stranded are sufficient to point me to errors in my logic or syntax, so I generally am not using the Viewer to those ends.
When I have made file-oriented errors, resulting from deleting a needed combo item, or neglecting to correctly name/provide a needed icon or model, or similar textual errors, the Viewer's error-handling has been impeccable in bailing me out, and I applaud you for that.
I just don't use it much for script-checking, as I tend to do most of that in my head, and through trial & error. The "rideoffset" error is an example. I had made that change hours before, and had gone on to experimenting with that unit in-game, debugging and making changes. After one change, I mistakenly clicked the Viewer icon, sitting next to the Stranded icon, on my desktop, and as the Viewer defaults to loading the last loaded mod, it threw the error. Given the nature of the prior 'unhandled exceptions', I was pretty sure just where it came from, checked by modifying the value, and posted you.
I may be wrong, but I suspect the average player, just beginning to experiment with modding, is unlikely to alter an integer to a decimal, because he/she doesn't think he/she should. If he/she does change it, or makes a typing error, they may not understand the nature of the resulting Viewer error or be able to adequately explain to you how it came about. I'm just trying to help.
In retrospect, in listing my creative 'process' in my prior post, I suspect I led you astray in item "h)", by not clearly stating the default loading of the current mod, with an error of my own making embedded in it, before loading the 'vanilla' mod to check. Ergo, your assumption I was having difficulties. Mea culpa...
Apologies if I offended you with the "younger" comment (I have gray hairs that have seen a few decades go by). I was just amazed at your attention & response time. I mistook you for a young (age-wise) programmer.
Let me see if I can turn it around by stating that I think your mind is young. Good for you! Keep it that way.
--------------------------------------------------
EDIT: I wanted to do this as a new post, as I wanted to redirect the conversation, but the forum software chastised me, so...
Quote
The only bugger is, I don't know how to read B3D at all. I really don't get it. I can read, ASM, C, C++, C#, Java and damn near anything else, just not Basic... (*hangs head in shame*)
I am just ... mind-boggled. Given what I've seen of your app, and your models, you are a high-caliber programmer. Maybe it is a generational thing. I go back to Intel 8088's, Timex/Sinclair Z80's, DOS 2.0, and interpreted BASIC.
I was never passionately involved in programming, despite my interest, due to RLS. Still, if i needed to do something somewhat complex, & the manual brute force effort was significant, I could cobble together a BASIC program to handle at least some of the work. That was the original idea of BASIC, a quick & dirty way for people without the skill for ASM to accomplish complex tasks. I dabbled some in ASM, and a Tandy UNIX offshoot called OS9.
Along about then, though I had heard of C, and was starting to get my feet wet with it, MSWin3.1, C++, C#, & OOP, where just becoming the leading, bleeding edge.
It was all way, way over my head. I understood the concepts; signals, queques, mouse messages, etc. But there were way too many commands that did small things that had to be strung together to do things that a single BASIC command could do. Sure, there were tons of library functions, but you had to wade through tons of often obtuse documentation to find what you needed. It gave tremendous flexibility and control to the dedicated programmer, at the expense of a very steep learning curve.
Interpreted Basic, had, at best, a couple of hundred commands, and a fairly simple syntax and grammar. Most people loved it. Dedicated programmers tended to look down on it because being interpreted a line at a time it was often necessary to use "goto's" and "gosub's", which in the hands of non-perfectionists would often result in 'spaghetti' code, and it burned machine cycles.
When compiled BASICs w/IDEs began to be introduced, the writers tried to address some of that by beginning to build in the ability for users to write functions, sub-functions, and the ability to write in-line ASM & C code.
'Course, by then, the real programmers had moved onward & upward, and were writing apps for MAC & MSWin that did things you used to do with BASIC, so fewer people were programming in BASIC, at all.
All this lengthy preamble leads me to the simple fact that you may be just too damned knowledgeable about contemporary programming to recognize the flint knife/stone axe aspect of BASIC. It's primitive.
re: BlitzBasic. I'm not familiar with it, never used it, but in looking at DC's source code, it is very reminiscent of Microsoft's QuickBasic. The early versions were interpreted, but later versions, v4.5, etc. were compiled. You might still find it floating around on the net in old archives. It had extensive tutorials & example programs included.
In looking at DC's code, it appears he did what you do with BASIC - he wrote his own functions using the 'basic' commands. I've only skimmed the code lightly, but I suspect he avoided any BlitzBasic-supplied library routines, in favor of writing his own from scratch.
As an example, see this post Some DC source code
I'm reasonably sure (though I am often, often wrong), that DC wrote that 'parse_comma' function from scratch using just Blitz commands, for the simple task of reading comma delineated parameters. All it does is sequentially test each character in the string passed to it to see if it is a comma, and returns a flag. It is up to the calling function to determine what to do based on the flag.
Still, you do not need to understand BASIC, BlitzBasic, or DC's source code to use the wealth of info embedded in it for your app. E.g.:
'load_game.bb' (the code that presumably interprets "sys\game.inf") begins with: 1
2
3
4
5
6
7
8
Global game_healthsystem
Dim game_exh_move#(2)
Dim game_exh_swim#(2)
Dim game_exh_jump#(2)
Dim game_exh_attack#(2)
Dim game_exh_damage#(2)
Global game_divetime=8000
Global game_divedamage#=1
He is declaring & DIMensioning 5 arrays of (I think) 3 elements (element0,element1,element2), and declaring 3 global variables, assigning a default value to 2 of them. Again, I think that the '#' designates a floating point value, and the lack of it, an integer. These look suspiciously like the variables seen in "sys\game.inf", i.e.
1
2
3
4
5
6
7
8
9
10
healthsystem=4
exhaust_move=0.02,0.02,0.016
exhaust_swim=0.06,0.05,0.06
exhaust_jump=0.08,0.08,0.08
exhaust_attack=0.15,0.15,0.15
exhausted_damage=1,1,1
dive_time=120000
dive_damage=0.25
So, look a little deeper (back to "load_game.bb"): 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;### Load Game
Function load_game()
	Local in$,var$,val$
	...
	... // a chunk of setup code
	...
Select var$
Case "healthsystem" game_healthsystem=Int(val$)
				
Case "exhaust_move"
	split(val$)
	game_exh_move#(0)=Float(splits$(0))
	game_exh_move#(1)=Float(splits$(1))
	game_exh_move#(2)=Float(splits$(2))
							
Case "exhaust_swim"
	split(val$)
	game_exh_swim#(0)=Float(splits$(0))
	game_exh_swim#(1)=Float(splits$(1))
	game_exh_swim#(2)=Float(splits$(2))
							
Case "exhaust_jump"
	split(val$)
	game_exh_jump#(0)=Float(splits$(0))
	game_exh_jump#(1)=Float(splits$(1))
	game_exh_jump#(2)=Float(splits$(2))
							
Case "exhaust_attack"
	split(val$)
	game_exh_attack#(0)=Float(splits$(0))
	game_exh_attack#(1)=Float(splits$(1))
	game_exh_attack#(2)=Float(splits$(2))
							
Case "exhausted_damage"
	split(val$)
	game_exh_damage#(0)=Float(splits$(0))
	game_exh_damage#(1)=Float(splits$(1))
	game_exh_damage#(2)=Float(splits$(2))
							
Case "dive_time" game_divetime=Int(val$)
						
Case "dive_damage" game_divedamage=Float(val$)
...
... // more Cases
...
End Select
'Select','Case', and 'End Select' are likely BlitzBasic commands, I doubt DC wrote them as functions, they, or something similar, can be found in QuickBasic.
'var$' is the left side of the '=' in the "sys\game.inf". Each 'Case' is the string used in the "sys\game.inf"
He uses a 'split' function to separate the 3 parameters he requires for the exhaustion routines and assigns them to their respective element position in their respective array, explicitly declaring their type as he does so. (I suspect he wrote the split function himself, but I haven't dug deep enough to verify that.) The actually code to perform the exhaustion routine is buried somewhere in the game function code files, but YOU don't need that.
(One item to note - in that chunk of setup code, he explicitly defines the character '#' as a comment delineator within the game .inf and script files. I think comments in the .bb files are strictly delineated by a semi-colon, though DC used the '#' after a semicolon in many of the files to visually separate sections.)
Regardless of whether you understand the code, given your programming skills, I think you could probably knock out a small tool in short order, that would read, and parse these files to determine accurately each parameters type, for those parameters you need to verify.
Hopefully, despite the length of this post, it has some value for you. Though I am already pushing the limit on my spouses patience with my computer time, if I can assist you with any of this, please feel free to PM me.
edited 1×, last 29.04.10 08:30:14 am