Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Icarus Scripts...

Page: 1 of 1
 JaedenRuiner
05-21-2004, 1:10 AM
#1
I am looking for a High Caliber ICARUS Scripter who might be able to answer complex Script syntax questions. I seem to a lot of flack for posting complex problems that people either don't understand or tell me i should go "find the people who know this stuff".

If anyone actually is really good at ICARUS and can answer some questions for me please let me know, and i'll pose the question.

Sorry, but it takes a lot of time to type these questions and i'd rather not waste the space.

Jaeden "Sifo Dyas" al'Raec Ruiner
 lassev
05-21-2004, 7:23 AM
#2
If you don't "waste" the time to write the question, you can be sure that Wade, Mercenary, mslaf, Leslie Judge, or any other "High Caliber ICARUS Scripter" will never answer the question. ICARUS is a land of vastness, and it's not nearly always guaranteed the things you are trying to achieve have been tried before, but the chances are good that you will get some sort of an answer, at least to some of your questions.

EDIT: Gods, I forgot mslaf from the list of "high caliber" scripters. Totally unforgivable after his winner duel map...
EDIT2: I'll be damned. I forgot also Leslie Judge. I hope he will be able to forgive me that lapse someday :(
 WadeV1589
05-21-2004, 7:27 AM
#3
Heh, thanks for that :D

He's right, post your questions here and we will answer or scream 'SEARCH GODDAMN IT' if we can find it by searching (I always check if I feel it's been answered before)
 lassev
05-21-2004, 7:01 PM
#4
Now, since I'm a clairvoyant, let me try to answer even before you ask... ;)

Try this one out. I don't know if it works (I have had no need to do such things as you are trying to do. I just build puzzles and cinematics).


if ( $get( FLOAT, "SET_SABER_OFFENSE") = 3$ )
{
print ( "!Offense=3, Testing: Pull=3" );
wait ( 2000.000 );
}


Alright! Let me point a couple'o'things for you: My if command is missing some (useless) stuff compared to the one you tried. I cannot say if it makes any difference, but try it out. Notice also that you might not have an if command like this originally in BehavEd. Don't you mind that, just type it in Notepad or edit your BehavEd reference files to get it in.

The other things is the print command. In order to print anything on screen, you need to include that exclamation mark inside the quotation marks but before the actual text. The mark won't be printed, but it's essential to print anything visible.

Good luck! Let us know if it works or not.
 JaedenRuiner
05-21-2004, 8:00 PM
#5
Originally posted by lassev
[B]Now, since I'm a clairvoyant, let me try to answer even before you ask... ;)

Nice...cute, but nice. Seeing some of my posts all over the JK community have we?
Originally posted by lassev
Try this one out. I don't know if it works (I have had no need to do such things as you are trying to do. I just build puzzles and cinematics).


if ( $get( FLOAT, "SET_SABER_OFFENSE") = 3$ )
{
print ( "!Offense=3, Testing: Pull=3" );
wait ( 2000.000 );
}


Tragically neither worked.

print() with the ! did nothing to change what my current code was doing, thus I had no feed back. Is there like a "debug" cvar i need to set in order for that to work? I noticed while in a few maps, cvarlist g_ produced one labeld g_ICARUSDebug, but it didn't seem to do anything, but it made me wonder.

Second, the if statement is still rather disturbing. What I am curious about is the fact that in the Set() command when referencing force levels, it is structured like this:

set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "3");

Well, quotes " " usually indicate a "string" type, yet it precedes that with the "FORCE_LEVELS" indicator which converts it to something else. I have tried using that syntax in my if statements as well.

I am beginning to think there is no way to do what I want to do, which is rather frustrating to me, (and seemingly rather foolish for RavenSoft, as some abilities require a specific level in specific force powers, thus they have ways of checking the current Force Power Level, just not in a "modder" accessable format.

*Shrug*

Thanks for the help,

Jaeden "Sifo Dyas" al'Raec Ruiner

ps: This is my actual code for anyone who cares.

affect ( "player", /*@AFFECT_TYPE*/ FLUSH )
{
waitsignal ( "update player force" );
print ( "!Setting Force Sight" );
set ( /*@SET_TYPES*/ "SET_FORCE_SIGHT_LEVEL", /*@FORCE_LEVELS*/ "3" );
wait ( 2000.000 );

if ( $get( FLOAT, "SET_SABER_OFFENSE")$, $=$, $2$ )
{
print ( "!Offense=2, Testing: Pull>1" );
set ( /*@SET_TYPES*/ "SET_CENTERTEXT", "Offense=2, Testing: Pull>1" );

if ( $get( FLOAT, "SET_FORCE_PULL_LEVEL")$, $>$, $1$ )
{
print ( "!Offense=2, Pull>1, Testing: Push>1" );

if ( $get( FLOAT, "SET_FORCE_PUSH_LEVEL")$, $>$, $1$ )
{
print ( "!Offense=2, Pull>1, Push>1, Setting: Throw=1" );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "1" );
}

}

}

print ( "!Testing Saber Offense=3" );
wait ( 2000.000 );

if ( $get( FLOAT, "SET_SABER_OFFENSE") = 3$ )
{
print ( "!Offense=3, Testing: Pull=3" );
wait ( 2000.000 );

if ( $get( FLOAT, "SET_FORCE_PULL_LEVEL") = 3$ )
{
print ( "!Offense=3, Pull=3, Testing: Push>1" );
wait ( 2000.000 );

if ( $get( FLOAT, "SET_FORCE_PUSH_LEVEL") > 1$ )
{
print ( "!Offense=3, Pull=3, Push>1, Setting: Throw=2" );
wait ( 2000.000 );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "2" );
}

print ( "!Offense=3, Pull=3, Testing: Push=1" );
wait ( 2000.000 );

if ( $get( FLOAT, "SET_FORCE_PUSH_LEVEL") = 1$ )
{
print ( "!Offense=3, Pull=3, Push=1, Setting: Throw=1" );
wait ( 2000.000 );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "1" );
}

}


else ( )
{
print ( "!Offense=3, ELSE Pull<3, Testing: Push=3" );

if ( $get( FLOAT, "SET_FORCE_PUSH_LEVEL")$, $=$, $3$ )
{
print ( "!Offense=2, Push=3, Testing: Pull>1" );
wait ( 5000.000 );

if ( $get( FLOAT, "SET_FORCE_PULL_LEVEL")$, $>$, $1$ )
{
print ( "!Offense=3, Pull>1, Push=3, Setting: Throw=2" );
wait ( 5000.000 );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "2" );
}


else ( )
{
print ( "!Offense=2, Push=3, ELSE Testing: PUll=1" );
wait ( 5000.000 );

if ( $get( FLOAT, "SET_FORCE_PULL_LEVEL")$, $=$, $1$ )
{
print ( "!Offense=3, Pull=1, Push=3, Setting: Throw=1" );
wait ( 2000.000 );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "1" );
}

}

}

}

}

print ( "!Testing: Offense=1" );
wait ( 2000.000 );

if ( $get( FLOAT, "SET_SABER_OFFENSE")$, $=$, $1$ )
{
print ( "!Offense=1, Setting: Offense=2" );
set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "2" );
}

signal ( "fade out" );
}
 lassev
05-22-2004, 4:48 AM
#6
Hmm. Print with the exclamation mark works for me every time I use it, so that's a fully working command. And that's the command I always use for debugging (if not some sound command occasionally). However, that was nothing but an appendage and nothing to solve your real problem, of course.

With your experience in programming in general, you are more advanced in that area than I will ever be, and your ICARUS code is such a neat looking feat that it doesn't really leave much to hope for. I might do a couple of experiments of my own, but honestly, after all the variations you have tested (and listed... umm... That I have foreseen) I don't have much faith in this. ICARUS has certainly left me down a few times in the past, and that's sadly just something to live with.

Like Justin "Jesterspaz" Negrete from Raven said: "Icarus isnt exactly a finely tuned hand built italian sports car engine." (Although I have no idea how that sentence might be related to this problem, but it just described ICARUS in a good way...).
 Mercenary
05-22-2004, 5:00 AM
#7
I don't get the point to all this. If you want to change force powers without using the console just make the adjustments in the scripts and load them as a mod.
 lassev
05-22-2004, 5:07 AM
#8
Originally posted by Mercenary
I don't get the point to all this. If you want to change force powers without using the console just make the adjustments in the scripts and load them as a mod.

I do get the point, and it's very interesting. He's looking for a way to check (in a script) what is the current status of a force power, and then react accordingly. Like, if it's "2", then something happens, if it's "3", then something else happens. It makes perfect sense that you should be able to check it. And like JaedenRuiner, I'm also aghast that it doesn't seem to be working.
 lassev
05-22-2004, 9:24 AM
#9
Well, I tried every trick I could think of, but to no avail. I can't think of any other reason for this malfunctionality except the fact that a force power level is defined as a "special table". Maybe it makes them all incompatible to the float, string, or vector data types. After all the tests I run through, also with variables, I can only deem this problem impossible to solve (as long as somebody else proves otherwise).

Sorry, but I cannot help. I hope this won't ruin your whole project.
 JaedenRuiner
05-23-2004, 2:10 AM
#10
Originally posted by lassev
I do get the point, and it's very interesting. He's looking for a way to check (in a script) what is the current status of a force power, and then react accordingly. Like, if it's "2", then something happens, if it's "3", then something else happens. It makes perfect sense that you should be able to check it. And like JaedenRuiner, I'm also aghast that it doesn't seem to be working.


Yes, exactly.. However, I have tested EVERYTHING I can think of, all formations that do not cause the ICARUS compiler in BehavED to crash on me. (Through the IBIze.exe compiler error).

I've even tried figuring out how to print the return value. Someone in another forum said the IF command is nonfunctional, which would explain a LOT of things, however the ELSE command is completely functional as I proved myself.

I am beginning to think that certain SET_TYPES are for input only. Like there is one SET_SKILL which is GET only, not SET, so in the map you cannot do: set(SET_SKILL, 2);
but you can do: get(FLOAT, "SET_SKILL").

So I'm thinking the SET_FORCE_*_LEVEL vars are only for usage of SETTING not GETTING. (pissy if you ask me).

As for Mercenary's question, it all comes down to my interpretation of Saber Throw and Force Powers. I am modding the game to be more like DFII: Jedi Knight, with the full control to update all force powers. Everything is done, except that there is no Saber Throw. I don't like the ability as only Darth Vader throws his saber, and it was an agressive "rage" attack, not a smoothly controlled boomerang that hovers spinning in the room. So I mostly wanted to script Saber Throw to directly relate to how much attention the player paid to Pull, Push, and Offense.

I think i'm going to give up now, and try and release what I have. *shrug* It was a valiant effort at least. Thanks for all the help guys.

Jaeden "Sifo Dyas" al'Raec Ruiner
 lassev
05-23-2004, 6:47 AM
#11
Originally posted by JaedenRuiner
Yes, exactly.. However, I have tested EVERYTHING I can think of, all formations that do not cause the ICARUS compiler in BehavED to crash on me. (Through the IBIze.exe compiler error).
Believe me, so did I! I saw enough of those errors, too...

Originally posted by JaedenRuiner
I've even tried figuring out how to print the return value. Someone in another forum said the IF command is nonfunctional, which would explain a LOT of things, however the ELSE command is completely functional as I proved myself.
Neither could I find a way to print the return value. I got only the script compile errors, when I tried to make the print command obey...

The IF command is indeed fully functional. I have multiple puzzle scripts using it, and it works like a dream.

Originally posted by JaedenRuiner
I am beginning to think that certain SET_TYPES are for input only. Like there is one SET_SKILL which is GET only, not SET, so in the map you cannot do: set(SET_SKILL, 2);
but you can do: get(FLOAT, "SET_SKILL").

So I'm thinking the SET_FORCE_*_LEVEL vars are only for usage of SETTING not GETTING. (pissy if you ask me).
Yeah. I agree.
 Mercenary
05-23-2004, 3:10 PM
#12
I think you're pushing ICARUS too hard with all those nested IF statements. You have to keep things relatively simple. I had one script that wouldn't work even though my logic was flawless:D but when I broke up the code to run on seperate successive scripts it worked.
 JaedenRuiner
05-23-2004, 7:06 PM
#13
Originally posted by Mercenary
I think you're pushing ICARUS too hard with all those nested IF statements. You have to keep things relatively simple. I had one script that wouldn't work even though my logic was flawless:D but when I broke up the code to run on seperate successive scripts it worked.

I would agree, except I have had a simple script that has NO nested if statements, just three if statements to test three different syntax formations at a time. No nesting, just printing and saber_throw setting, and even then it didn't work. I get all the Print statements from before each If statements, but none of the print statements from within the if() block are executed.

True the complexity may be an issue, but I do not think that is the case here.

Jaeden "Sifo Dyas" al'Raec Ruiner
Page: 1 of 1