Author Topic: Internal commands  (Read 235173 times)

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #30 on: July 30, 2012, 04:33:08 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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #31 on: July 30, 2012, 06:13:57 AM »
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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #32 on: July 30, 2012, 06:22:20 AM »
changecustommood().

Not customchangemood()? :)

FIQ

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #33 on: July 30, 2012, 06:24:51 AM »

Dav999

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #34 on: July 30, 2012, 07:00:42 AM »
changecustommood().

Not customchangemood()? :)
Nope!

That's a bit odd then:

customifflag
customiftrinkets
customiftrinketsless
customposition
changecustommood ???

FIQ

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #35 on: July 30, 2012, 07:13:40 AM »
changecustommood().

Not customchangemood()? :)
Nope!

That's a bit odd then:

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

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #36 on: August 02, 2012, 11:24:37 AM »
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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #37 on: August 02, 2012, 01:18:15 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.

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

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #38 on: August 02, 2012, 03: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?

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

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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #39 on: August 02, 2012, 03:22:47 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!

Also, it seems that you pressed the "Insert Quote" button by accident.

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

FIQ

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #40 on: August 03, 2012, 03:15:37 AM »
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)
« Last Edit: August 03, 2012, 03:19:54 AM by FIQ »

blue626

  • Captain
  • *****
  • Posts: 672
  • I changed my avatar!
    • View Profile
Re: Internal commands
« Reply #41 on: August 03, 2012, 03: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)?

FIQ

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #42 on: August 03, 2012, 03:53:54 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

  • Global Moderator
  • Captain
  • *****
  • Posts: 2167
    • View Profile
    • The Open Level Project
Re: Internal commands
« Reply #43 on: August 03, 2012, 04:08:56 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

  • Captain
  • *****
  • Posts: 810
  • https://github.com/FredrIQ/
    • View Profile
    • FIQ
Re: Internal commands
« Reply #44 on: August 03, 2012, 11:27:49 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.