Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Wed Nov 25, 2026 4:29 am
All times are UTC + 0
Change script.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
zsu
Vehicle Drone


Joined: 29 Sep 2012

PostPosted: Mon Jan 07, 2013 11:39 pm    Post subject:  Change script. Reply with quote  Mark this post and the followings unread

Trying to change script by "4=17,100" instruction. After unload from transport, unit do nothing. What is going wrong?

[00000410-G]
0=58,131125
1=14,0
2=53,0
3=8,2
4=17,100

100=00000412-G

[00000412-G]
0=0,4

How many lines can include script? <= 9 lines I guess.

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Tue Jan 08, 2013 7:54 am    Post subject: Reply with quote  Mark this post and the followings unread

More than 9 lines can be included into scripts.
I´m not sure how the ´change script´ action works, whether it requires the ID, or the full name of the script.

Could it be your taskforce is incapable of attacking the target, does it exist?

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jan 08, 2013 12:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

The game reads 50 script actions, that is 0= to 49= (it actually reads all, but discards them if they do not fit).

The script action 17 (Change Script) kills the currently running script and restarts with the first action of another script defined by a given index.

In your case, the index is 100, that is the game tries to load the 101st script defined in the [ScriptTypes] list (whatever key or value it has). The game does not use 100=... from the script section.

Count which index (0-based) the script you want to switch to has in [ScriptTypes] list. Use that number instead of 100.

_________________

Back to top
View user's profile Send private message
zsu
Vehicle Drone


Joined: 29 Sep 2012

PostPosted: Tue Jan 08, 2013 4:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

AlexB wrote:
The game reads 50 script actions, that is 0= to 49=

Good news.

AlexB wrote:
In your case, the index is 100, that is the game tries to load the 101st script defined in the [ScriptTypes] list (whatever key or value it has). The game does not use 100=... from the script section.

Count which index (0-based) the script you want to switch to has in [ScriptTypes] list. Use that number instead of 100.


In this case how to specify 0C9C878C-G script, which have index 0?
[ScriptTypes]
0=0C9C878C-G

OK, if game tries to execute 101 script, then unit must do something anyway. However, he idle near from enemy base. Lets look on 101 content.
[ScriptTypes]
101=00000610-G

[00000610-G]
0=54,0 - Regroup (after unload from transport, he must go to friendly base)
1=0,10 - attack Occupiable building (which does not exist on the map)
2=0,6 - attack Factories (exist, unit able to attack it)
3=0,9 - too
4=49,0
5=0,2 - too

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jan 08, 2013 6:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

zsu wrote:
In this case how to specify 0C9C878C-G script, which have index 0?
[ScriptTypes]
0=0C9C878C-G

xxx=17,0 will use this script if it is the first in the [ScriptTypes] list. Please note that it does not matter what is left hand side of the equal sign. If you have

[ScriptTypes]
2=abc
0=def
john=aaa

then abc is index 0, def is index 1 and aaa is index 2.

zsu wrote:
OK, if game tries to execute 101 script, then unit must do something anyway. However, he idle near from enemy base. Lets look on 101 content.
[ScriptTypes]
101=00000610-G

Again, you are mixing index and key name. Where do you get 101= from? 101= does not mean anything.

I guess index 100 is valid (thus there are more than 100 scripts). Otherwise the game should crash. What the script at index 100 does (or whether it is the one you posted) is beyond my knowledge.

_________________

Back to top
View user's profile Send private message
zsu
Vehicle Drone


Joined: 29 Sep 2012

PostPosted: Tue Jan 08, 2013 8:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

"0=0C9C878C-G" is the 1st line in [ScriptTypes] table. He have index 0. If so, then 17,0 will execute script with ID "0C9C878C-G", true?

For example, string "101=00000610-G" placed on line N 102 (I do not count "[ScriptTypes]" header here) in [ScriptTypes] table. So, "17,101" instruction will execute script with ID "00000610-G", true?

Quote:
Again, you are mixing index and key name.

Not sure. The count starts at 0 in [ScriptTypes] table. Number of each next following string = previous number+1. As result, last item in [ScriptTypes] table with number 118 placed on line N 119 and, I assume, have index 118.

Quote:
What the script at index 100 does

[00000410-G]
0=58,131125
1=14,0
2=53,0
3=8,2
4=17,101 (do not remember exactly, because aimd.ini replaced with backup and all changes now lost)

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Jan 08, 2013 10:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

True and true, if at least 102 keys are present and valid. Generally, this logic only applies if you only use numeric key names without gaps starting with 0=. But that is not obvious from the short code snippet you posted.

_________________

Back to top
View user's profile Send private message
zsu
Vehicle Drone


Joined: 29 Sep 2012

PostPosted: Wed Jan 09, 2013 4:39 am    Post subject: Reply with quote  Mark this post and the followings unread

If ~16 lines can be included into script (it is possible as I see now), then I do not need "17,x" instruction.

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Wed Jan 09, 2013 12:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

What do you mean?
Is it
16=?
Because 17,x is an script action that has a purpose.

16=17,x

'16' is the index, starting from 0 to 16 (thus you have 17 script actions listed)
'17,x' is the actual script action that executes an order.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
zsu
Vehicle Drone


Joined: 29 Sep 2012

PostPosted: Thu Jan 10, 2013 11:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

I mean the number of actions in script. If it is not limited to 9 lines, then this topic does not actual anymore.

[00000410-G]
Name=Рос. Диверсии Ивана на базе альянса
0=58,131435
1=14,0
2=53,0
3=8,2
4=0,4
5=0,6
6=0,9
7=0,7
8=0,8
9=0,5
10=0,10
11=6,5 - By the way, here I have some doubts. He will return to action "5=0,6" or "4=0,4"? He repeat 0,4 unnecessarily.
12...
13..
16...etc

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Thu Jan 10, 2013 11:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

It will jump to '4=0,4'.
You have to start counting from the 0, basically, 0=1, 1=2, 2=3, 3=4, 4=5.

As AlexB told you already:
AlexB wrote:
The game reads 50 script actions, that is 0= to 49= (...).

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Last edited by RP on Mon Jan 14, 2013 12:08 am; edited 1 time in total

Back to top
View user's profile Send private message
zsu
Vehicle Drone


Joined: 29 Sep 2012

PostPosted: Sun Jan 13, 2013 10:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

With jump to 5=0,6 he use anyway MakeupKit often unnecessarily.

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Jan 14, 2013 12:07 am    Post subject: Reply with quote  Mark this post and the followings unread

That's because you keep telling it should jump to that line, so everytime it jumps to that line, it will attack an infantry unit thus using MakeupKit 'often unnecessarily'.
Doesn't matter if you have FireOnce=yes, when it fires, it continues down at line 6=, if you tell it to go back AFTER it finished line 5, it will simply re-execute that line.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
DeeZire
Cyborg Engineer


Joined: 20 Nov 2006

PostPosted: Sat Jan 19, 2013 10:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

On a related note, can any of you guys shed any light on ScrptType action 18 (change Team)?

AFAIK it works in the same way - it's parameter takes an index from the [TeamTypes] list - however this action is only used ONCE in all of RA2 and YR in the first tutorial mission in RA2 where its parameter is set to 362;-

[TeamTypes]
0=0D7FE2AC
1=0D521B7C
2=0B197B7C
3=0D7D821C
4=0AF76B7C
5=0AF766CC
6=0C1046CC
7=0D6E0A4C
8=0AF738EC
9=0AFD1C8C
10=089399CC
11=0B070B5C

[0AD657AC]
Name=Change House and Stand Up
0=20,19
1=18,362

It works in RA2 but not in YR, whats up with that and why is the parameter 362?

Back to top
View user's profile Send private message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Sat Jan 19, 2013 11:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Is it used in a trigger? Meaning: ACTUALLY used. There are lots of triggers in those tutorial missions that aren't used.

Ofcourse, it could be some WW shizzle, like with attack enemy building having no normal building index, like '01' but a series of six numbers.

I don't know why it doesn't work in YR, but it could be similar to the 'Pre-existing Nuke on map' thingy I read earlier.

You DO need to set 'DisabledFromShell=yes' in YR to make the Nuke have an actual SW, yet you don't in RA2.
A lot of things got changed, or simply broken during the process of going from RA2 engine to YR engine ,I guess...

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1788s ][ Queries: 9 (0.0094s) ][ Debug on ]