[Mod] Your-Freedom - Works with 20121019 !

Gives you ability to have scripts for your maps

Information and discussion for custom maps and mods.
Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

[Mod] Your-Freedom - Works with 20121019 !

Post 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.


Last edited by Holloweye on Sun Apr 28, 2013 9:07 am, edited 12 times in total.

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff »

Thanks for this, should be able to set up some half-decent pseudo-missions now.

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post 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?
Hail to the soviets!

User avatar
Harisson
Posts: 149
Joined: Sun Jan 13, 2008 10:03 pm

Post by Harisson »

:eek: Woooow,
that's perfect, thank you :)

User avatar
zypres1
Posts: 276
Joined: Mon Oct 24, 2011 8:22 pm

Post 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..
Attachments
yr.txt
log
(15.43 KiB) Downloaded 560 times

Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

Post 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.

User avatar
zypres1
Posts: 276
Joined: Mon Oct 24, 2011 8:22 pm

Post by zypres1 »

Thank you for helping, will try it out later...
Btw: the logs should say what version of .net you have...

Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

Post 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.

Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

Post 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
Attachments
s2.PNG
s2.PNG (114.32 KiB) Viewed 16275 times
s1.png
s1.png (78.92 KiB) Viewed 16275 times

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post 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.

Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

Post 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.

wusche1
Posts: 87
Joined: Tue Jan 10, 2012 6:44 pm

Post 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.

Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

Post 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.

User avatar
zypres1
Posts: 276
Joined: Mon Oct 24, 2011 8:22 pm

Error

Post 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...

Holloweye
Posts: 100
Joined: Sun Nov 28, 2010 12:21 pm

Re: Error

Post 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.

Post Reply