Internal commands

Started by Hilbert, July 28, 2012, 01:23:29 PM

Previous topic - Next topic

Dav999

Quote from: FIQ on July 30, 2012, 10:32:10 AM
Dav999: In 2.0, you couldn't use say()/reply() to get the dialogs of other crewmates. This works in 2.1. As crewmate are handled in another way in custom levels than in the main game, a "new" position command has to be created to position it accordingly to these. So in 2.0, position(center) is what say()/reply() will make, in 2.1, it's named customposition().

Ok. Now I get it. But does sad(crewmate)/happy(crewmate) really convert to changemood(colour,mood) then? Because I tried changemood(colour,0) on a crewmate who has been placed there with O: Crewmate and not with createcrewman(), and he stayed sad. Maybe the changemood() command has been changed in 2.1, but I don't know.

FIQ

Right, I forgot that. It's *impossible* to change mood of "O" crewmates in 2.0. In 2.1, this is possible with changecustommood().

Dav999


FIQ


Dav999

Quote from: FIQ on July 30, 2012, 01:24:51 PM
Quote from: Dav999 on July 30, 2012, 01:22:20 PM
Quote from: FIQ on July 30, 2012, 01:13:57 PM
changecustommood().

Not customchangemood()? :)
Nope!

That's a bit odd then:

customifflag
customiftrinkets
customiftrinketsless
customposition
changecustommood ???

FIQ

Quote from: Dav999 on July 30, 2012, 02:00:42 PM
Quote from: FIQ on July 30, 2012, 01:24:51 PM
Quote from: Dav999 on July 30, 2012, 01:22:20 PM
Quote from: FIQ on July 30, 2012, 01:13:57 PM
changecustommood().

Not customchangemood()? :)
Nope!

That's a bit odd then:

customifflag
customiftrinkets
customiftrinketsless
customposition
changecustommood ???
Ask simonroth, not me :P

blue626

Quote from: FIQ on July 28, 2012, 09:34:13 PM
foundtrinket(x) - Found a trinket. x is the trinket ID (1-20 usually). The ID is hard to grab in a custom level, bruteforce if you're uncertain and see which is removed. 21+ will increase the trinket counter but not actually give any trinkets - in case you want secrets for 105%+ trinket completion :)
In the normal game, 2 maps has more than one layout.

Do you mean that one of the trinkets is erased from the level after using that command? If yes, then where was the trinket :victoria: (or :vitellary:) found, in the main game? It uses that command in there, am I right? And if you use that command with x>20 after getting all the trinkets, does it show "Twenty One"? I have read about a code that contains a list of the numbers for the trinket counter, like "Zero", "One", "Two", etc. It contained "Twenty One", but not "Twenty Two", etc. and that produced the 21st trinket glitch. It was fixed in v.1.1, but I don't know if "Twenty One" is still in the code. Did you try using that command with x>20 twice? I wonder what that does...

2 maps? Do you mean Dim. VVVVVV and the Polar Dimension? Does the Polar Dim. have alt sates too?

Also, I don't understand the difference between ifflag and customiffflag (and with iftrinkets too).

Btw: In one of my previous posts in this thread, I wrote "agile". I didn't want to write that! :D I might have written the words too fast and then one was corrected automatically to "agile". :-[ >:( Just ignore that word.

Dav999

Quote from: blue626 on August 02, 2012, 06:24:37 PM
Also, I don't understand the difference between ifflag and customiffflag (and with iftrinkets too).

Ifflag loads a hardcoded script (from the real game) when used in internal scripting, and because all simplified commands have to be converted to internal commands, a new command had to be made that loads a custom script. That command isn't used in the real game, just like all commands which contain 'custom'. It was just made to be able to convert certain things.

Quote from: blue626 on August 02, 2012, 06:24:37 PM
Btw: In one of my previous posts in this thread, I wrote "agile". I didn't want to write that! :D I might have written the words too fast and then one was corrected automatically to "agile". :-[ >:( Just ignore that word.

I know that, autocorrect. What were you trying to write?
Quote

blue626

So, ifflag (internally) loads a script from the main game while customifflag (internally) loads a user-made script (in a user level). Am I right?

I still don't know about foundtrinket and the 21st and 22nd trinkets, though.

Quote from: Dav999 on August 02, 2012, 08:18:15 PM
Quote from: blue626 on August 02, 2012, 06:24:37 PM
Btw: In one of my previous posts in this thread, I wrote "agile". I didn't want to write that! :D I might have written the words too fast and then one was corrected automatically to "agile". :-[ >:( Just ignore that word.

I know that, autocorrect. What were you trying to write?
Quote

I looked at the post now. It was reply 13. I was trying to write "a file" and probably forgot to write the space. Also, it seems that you pressed the "Insert Quote" button by accident.

Dav999

Quote from: blue626 on August 02, 2012, 10:02:44 PM
So, ifflag (internally) loads a script from the main game while customifflag (internally) loads a user-made script (in a user level). Am I right?

Yes!

Quote from: blue626 on August 02, 2012, 10:02:44 PM
Also, it seems that you pressed the "Insert Quote" button by accident.

Yes, whoops! I'm not going to delete it, though :P

FIQ

#40
The trinket used doesn't exists in the game somewhere. As Terry created the map, he could have inserted the entities with whatever metadata he wanted. He simply left one ID to use with foundtrinket(). He could even use numbers >20. It wouldn't log trinket completion in the savefile, but it would otherwise do no difference at all (as long as he also changed the ID for the found-trinket entity (entity 22) that applies to that trinket, in the trinket collection), and wouldn't really matter.

EDIT: Never mind, it wouldn't work. The trinket would be collected, and show up in the collection - but as trinkets >20 isn't saved as "found" in the savefile, when you quit and return, the trinket would be gone from the collection (but you would still have the same number of trinkets, as that is stored in another way)

blue626

I noticed somethiing: why do you need to write the following text before the internal commands?

say(-1)
text(1,0,0,4)
say(5)

Couldn't you use the following?

say(-4)
say(5)

Or even this last text?

say(-5)

And, why is the text command used above has a number instead of a color (like when you create text boxes with internal scripting)?

FIQ

Quote from: blue626 on August 03, 2012, 10:04:59 PM
I noticed somethiing: why do you need to write the following text before the internal commands?

say(-1)
text(1,0,0,4)
say(5)

Couldn't you use the following?

say(-4)
say(5)

Or even this last text?

say(-5)

And, why is the text command used above has a number instead of a color (like when you create text boxes with internal scripting)?
say(-4), say(-2403), say(-1), every of them works fine.

text(1,0,0,4) - the 1 was when I played around with the parser (before I found a "correct" way to execute things as I wanted). I realize that you can use whatever you want - it doesn't matter at all. text(terryisanicedev,0,0,4) should work as well :)

I just sticked to say(-1), text(1,0,0,4) to be consequent.

Dav999

Quote from: FIQ on August 03, 2012, 10:53:54 PM
Quote from: blue626 on August 03, 2012, 10:04:59 PM
I noticed somethiing: why do you need to write the following text before the internal commands?

say(-1)
text(1,0,0,4)
say(5)

Couldn't you use the following?

say(-4)
say(5)

Or even this last text?

say(-5)

And, why is the text command used above has a number instead of a color (like when you create text boxes with internal scripting)?
say(-4), say(-2403), say(-1), every of them works fine.

text(1,0,0,4) - the 1 was when I played around with the parser (before I found a "correct" way to execute things as I wanted). I realize that you can use whatever you want - it doesn't matter at all. text(terryisanicedev,0,0,4) should work as well :)

I just sticked to say(-1), text(1,0,0,4) to be consequent.

A new way to put comments in scripts!
Do the coordinates matter or do they have to be 0,0?

say(-12321)
text(ThisDoesntMatter,Does,It,4)
say(5)

FIQ

Quote from: Dav999 on August 03, 2012, 11:08:56 PM
Quote from: FIQ on August 03, 2012, 10:53:54 PM
Quote from: blue626 on August 03, 2012, 10:04:59 PM
I noticed somethiing: why do you need to write the following text before the internal commands?

say(-1)
text(1,0,0,4)
say(5)

Couldn't you use the following?

say(-4)
say(5)

Or even this last text?

say(-5)

And, why is the text command used above has a number instead of a color (like when you create text boxes with internal scripting)?
say(-4), say(-2403), say(-1), every of them works fine.

text(1,0,0,4) - the 1 was when I played around with the parser (before I found a "correct" way to execute things as I wanted). I realize that you can use whatever you want - it doesn't matter at all. text(terryisanicedev,0,0,4) should work as well :)

I just sticked to say(-1), text(1,0,0,4) to be consequent.

A new way to put comments in scripts!
Do the coordinates matter or do they have to be 0,0?

say(-12321)
text(ThisDoesntMatter,Does,It,4)
say(5)
It might ignore that line as coordinates isn't numvers, but otherwise they don't matter.