Page 1 of 2

[Mod] Your-Freedom - Works with 20121019 !

Posted: Thu Feb 02, 2012 6:05 pm
by Holloweye
Your-Freedom mod

Description:
This mod gives you the ability to create scripts for your maps. Almost no limitations. If there something you want to be added that you find impossible at the moment post it here and I'll see what I can do to fix it. Mod comes with two maps with scripts inside of them to show how to get started. This mod has been created to make it possible for people with less or none programming experience to make some cool maps. Please share code with each other or with me for that matter. Happy scripting!

To install:
Extract archive and put yf folder inside OpenRA/mods/...
Simple as that!

If you script would fail there will be a script.log file that you can read for more info what went wrong.

The mod comes with two examples, shellmap and Art of defense. Both of these use scripts so you can read and learn from them.

Works on Windows. Not sure about linux or mac.
Works with version: 20121019

Download sources here: https://github.com/Holloweye/Your-Freedom
Download binary 0.01: <removed>
Download binary 0.02: <removed>
Download binary 0.03: <removed>
Download binary 0.04: <removed>
Download binary 0.05: <removed>
Download binary 0.06: http://www.speedyshare.com/pZMaX/download/yf.rar

0.02 news:
Art of defense changes:
- Fixed waves
- No crash when you lose
- Ore Purfier removed
- Ore derriks added

Code:
- Create widget for player added
- Changed error output text
- RandomWaypoint method added
- ClosestActorTo method added
- DistanceToAnyActorFrom method added
- Blink method added
- PaletteColorModifier method added
- Now possible to access callback method variables in script.
- Rewrote some palette modifier stuff

Other:
- Added a new work in progress map Zombie Survival

and more..

0.03 news:
Art of defense changes:
- Preview image added

Zombie survival changes:
- Zombies has new yaml
- No crash on multiplayer
- Removed dog

Code changes:
- Added new methods for synced/desynced code
- Scripts interface changed
- Preview images implemented

0.04 news:

Code changes:
- Added new traits for a parachute plane to be buildable
- Changed scripts from inherit from a interface to a class with virtual methods. This means you don't need to make a empty content for each method you're not using. Now you only need to override the ones you use.

Other changes:
- New map Tic Tac Toe (work in progress) not playable yet.

0.05 news:

Path of beyond (aka test map) changes:
- Added experiance bar, CustomGainsExperiance to all units

Code changes:
- Added new trait Experiance bar
- Added new trait CustomGainsExperiance, CustomGivesExperiance (CustomGainsExperiance has support for 60 ranks instead of 4). This could be good for maps where you only have 1 unit.
- Fixed issue with PaletteColorModifier

File changes:
- New SHP for the ranks

0.06 news:

- Now possible to build / use with latest playtest (1019).
- Removed maps that has not been tested.
- Removed functionality for fade.



Posted: Thu Feb 02, 2012 7:17 pm
by BaronOfStuff
Thanks for this, should be able to set up some half-decent pseudo-missions now.

Posted: Thu Feb 02, 2012 9:49 pm
by Petrenko
Cool,

i got a week off at monday and i'm going to try this out. Plus the tileseteditor.

Can i create missionbriefings and dialogue?

Posted: Thu Feb 02, 2012 10:53 pm
by Harisson
:eek: Woooow,
that's perfect, thank you :)

Posted: Fri Feb 03, 2012 1:52 am
by zypres1
I really want to play this, but it fails.
I can play slowly, with purple debug going ekg crazy, and crash (when script kicks in?) after 4-5 min.

I guess it's my permissions that's wrong, since I get the error messages with temp folder..

Posted: Fri Feb 03, 2012 7:20 am
by Holloweye
zypres1 wrote: I really want to play this, but it fails.
I can play slowly, with purple debug going ekg crazy, and crash (when script kicks in?) after 4-5 min.

I guess it's my permissions that's wrong, since I get the error messages with temp folder..
What version of .NET you have? Because this project requires stuff like reflection. Not sure when that was introduced but you should probably make sure you have latest version of .NET.

I have no idea why it try to access that file "2uqkkkv-.dll" I tried to google what it was but there was no results.

What you can try to do is download the sources and compile. Then see what line it fails on. Here is a basic idea how you compile YF with OpenRA (VS 2010):
1. Download OpenRA sources here https://github.com/OpenRA/OpenRA/tree/playtest-20111223 (Press the ZIP button or get it with git)
2. Download YF here https://github.com/Holloweye/Your-Freedom (ZIP or with git)
3. Extract YF and put files inside OpenRA souces folder. (Replace stuff if necessary)
4. Open up the solution file with Visual Studio.
5. Right click on project inside VS and select Add existing project.. then locate OpenRA.Mods.YF there is a project file inside.
6. Re-Build all. (Hopefully this works else I forgot a step)
If you try to run through VS you will probably get a error because there is missing some DLL files for it to run. What I normaly do is copy all DLL files from the binary version of 20111223. Then I rebuild and run.

This might give you a line where it crashed which will help me a lot probably.

Posted: Fri Feb 03, 2012 2:46 pm
by zypres1
Thank you for helping, will try it out later...
Btw: the logs should say what version of .net you have...

Posted: Sat Feb 04, 2012 10:27 pm
by Holloweye
Petrenko wrote: Cool,

i got a week off at monday and i'm going to try this out. Plus the tileseteditor.

Can i create missionbriefings and dialogue?
You can create widgets so yeah.

Posted: Sun Feb 05, 2012 1:55 am
by Holloweye
Version 0.02
0.02 news:
Art of defense changes:
- Fixed waves
- No crash when you lose
- Ore Purfier removed
- Ore derriks added

Code:
- Create widget for player added
- Changed error output text
- RandomWaypoint method added
- ClosestActorTo method added
- DistanceToAnyActorFrom method added
- Blink method added
- PaletteColorModifier method added
- Now possible to access callback method variables in script.
- Rewrote some palette modifier stuff

Other:
- Added a new work in progress map Zombie Survival

and more..
Description of Zombie Survival:

You select a soldier you want to start with. When you pressed one of the buttons your unit will be spawned on the map (random position).

When all players have selected a unit the game starts. You only have 15 seconds to select a unit else you will be automatically assigned one.

Your mission is to be the last man standing. Zombies will be spawning randomly all over the map. Attacking the closest enemy unit.

Other:
- Thunder effects
- Spawn system
- Palette modified to make map more of a darker feeling
- Background music

Posted: Sun Feb 05, 2012 7:55 pm
by BaronOfStuff
Loving the palette change and visual effects, however there is one glaring problem: the Zombies are completely useless!

Other than that it is shaping up very well, although crates need disabling too. You invariably end up with an MCV and can just (needlessly) fence your starting unit in and watch as the zombies get confused and slow everything down.

Posted: Sun Feb 05, 2012 8:14 pm
by Holloweye
BaronOfStuff wrote: Loving the palette change and visual effects, however there is one glaring problem: the Zombies are completely useless!

Other than that it is shaping up very well, although crates need disabling too. You invariably end up with an MCV and can just (needlessly) fence your starting unit in and watch as the zombies get confused and slow everything down.
Thank you.
Map is work in progress. Yeah zombies don't do much at the moment but I will fix the settings. Also crates will only contain like health bonus in next version.

Posted: Mon Feb 06, 2012 2:35 pm
by wusche1
I have not tried the mod yet, but here are two questions:

-- Does this have a chance to go into the main version?
-- How high are the chances of abuse e.g. security loopholes etc.

All in all I think that scripting support would open up a lot of possibilities -- even if that would be just a very standardized set of accepted scripting commands and not the whole C# spectrum, as You did it.

Posted: Mon Feb 06, 2012 4:17 pm
by Holloweye
wusche1 wrote: I have not tried the mod yet, but here are two questions:

-- Does this have a chance to go into the main version?
-- How high are the chances of abuse e.g. security loopholes etc.

All in all I think that scripting support would open up a lot of possibilities -- even if that would be just a very standardized set of accepted scripting commands and not the whole C# spectrum, as You did it.
-- Does this have a chance to go into the main version? Main version as in the playtests/releases? Probably not but I have not asked chrisf about it.
-- How high are the chances of abuse e.g. security loopholes etc. Very high.. Though the people here are trust worthy and wont do anything stupid. Also the sources are availiable so you can always check them before you play someone elses map.

I will later on limit the access to certain librarys for safety reasons.

Error

Posted: Mon Feb 06, 2012 7:59 pm
by zypres1
I had problem with the game, when I disabled the anti-virus program Komodo it all worked...
So, try that if you have tried to fix your .net.... Amazing mod...

Re: Error

Posted: Tue Feb 07, 2012 7:27 am
by Holloweye
zypres1 wrote: I had problem with the game, when I disabled the anti-virus program Komodo it all worked...
So, try that if you have tried to fix your .net.... Amazing mod...
The scripts that run in the game are written to a temporary location. This is might be what your anti-virus dose not like. Sounds like a bad idea to disable the whole anti-virus program.. try just ignore OpenRA.Game.exe for the anti-virus program instead it might be enough, until I found a solution.