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 Fri Apr 19, 2024 9:44 pm
All times are UTC + 0
Making fscripts
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Thu Dec 20, 2012 11:37 pm    Post subject:  Making fscripts Reply with quote  Mark this post and the followings unread

I was wondering if there are any tutorials about making fscripts for FinalAlert. Those (handy) tool scripts to extend the map by 50, or add 4 Apoc tank attack trigger.

I've looked into FlyingZ's work, and I assume he did not find everything out by himself.

_________________


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
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Thu Dec 20, 2012 11:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

FinalAlert 2 -> Help -> Manual, listed under main table of contents is page '10. FinalAlert 2:YR User Scripts', which contains documentation of the script language used. That's really all you need or get.

It's kind of limited in the end, but still extremely useful tool for certain types of tasks. For example, I modified FlyingZ's waypoint grid script to apply rain/snow animations and sounds for any map I like.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Fri Dec 21, 2012 12:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Just examine an already existing script that's somewhat similar to what you're trying to do and use it as a reference to create your own.

_________________

Back to top
View user's profile Send private message ModDB Profile ID YouTube User URL Facebook Profile URL
EricAnimeFreak
Tiberian Fiend


Joined: 14 Sep 2009
Location: USA New England

PostPosted: Fri Dec 21, 2012 8:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Rather then a script, i prefer to make a INI file. Here's my guide from my MLEP manual to how to use a ini inject file:

-------------------------------------------------------------

Map Conversion Tutorial

You will need Final Alert 2, and the 01 add Storms and Fog.ini provided with MLEP.

Begin by openining your map in FA2 by selecting file, then open.
Now make sure you are not in beginner mode. "Check under options and make sure beginner mode is not checked."
Next go to edit then select INI editing. Now hit the Insert another INI file content.
Go ahead and select the 01 add Storms and Fog.ini provided with MLEP.
It will ask if you want it to overide previous settings, accept.
Finnaly you are done, save your map, it is now MLEP enabled!



--------------------------------------------------------------

With this method all you need do is make 1 master ini file, and then anyone can run that file for any of their maps to inject code into their map.

I never learned how to make an fscript but I can't imagine it being too different.

_________________
Grab my Map Logic Expansion Pack 5.2 here!
Adds random weather patterns into maps.
More disabled navalyards.
Preplaced Neutral buildings.
Additional new features.

Enjoy Everyone!

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


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Fri Dec 21, 2012 4:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

When I try to multiply a float variable (0.690000) by 100, it returns 0.

SetVariable("%LRed%","%Value%");
Multi("%LRed%","100");

Without the multiplier it works, but the value has to be multiplied by 100 to fit in with the trigger.

_________________


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
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Fri Dec 21, 2012 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Well my guess is that the function 'Multi' only performs integer multiplications. Which means, that 0.69 is probably truncated to 0 and there we go. Out of luck with that one, I guess.

EDIT: Yep, this appears to be the case, considering 1.6 multiplied by 100 etc. result in 100 and so on.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Sun Dec 23, 2012 12:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Can't I use "GetChar(Char,String, Pos);" for 0.69? So it would get 6 as pos3 and 9 as pos4 and then paste them together as '69'?
Is that possibru?

_________________


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
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sun Dec 23, 2012 8:20 am    Post subject: Reply with quote  Mark this post and the followings unread

RP wrote:
Can't I use "GetChar(Char,String, Pos);" for 0.69? So it would get 6 as pos3 and 9 as pos4 and then paste them together as '69'?
Is that possibru?


That one takes a character as a parameter, so it only retrieves a specific character from a specific position in the string. Kind of prevents you from using it for that. Would've been lot more useful if it only required string & position, though.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Thu Dec 27, 2012 11:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

If you cancel a script, with a variable set, can you show a message first?
Like, something in the INI file is incorrect, show message with reason then cancel?

EDIT:
Can I also make the script continue if a variable is true? Similar like Cancel();, you can make it cancel if a variable is true. Can I create some sort of 'green light' check to see if something is correct, THEN it continues? This is so I can use multiple INI keys.

EDIT2:
Is there a way to cancel the script when it asks for an Integer, House, Trigger, Country etc... input? I have noticed you can spam the cancel button all you like, but it isn't cancelling.

_________________


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 [9 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.1935s ][ Queries: 11 (0.0075s) ][ Debug on ]