Crude Spectator Mod (for 2.3.6)

Did you create a mod, map, music, or a tool? Present them here and earn feedback!
Note: addon requests do not belong here.
Note, everything uploaded to this forum, MUST have a license!
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Crude Spectator Mod (for 2.3.6)

Post by Mysteryem »

I set myself the challenge of creating a spectator mod just by txt editing and editing some of the scripts. Due to the nature of the mod, any maps that are to be used with it need to be edited to work properly and you can only have up to 8 players/spectators on 1 map (2 players and 6 spectators for example). Quite a few errors are thrown up in stderr.txt, but nothing serious. Here is a short video explaining some of it: http://www.youtube.com/watch?v=h6JbezNkgVQ

How the mod works (feel free to ask if you want to know more and/or don't understand some of it):
The spectators have HQs and and satellite uplink centres, yet the players have empty bases.
First I had to find out which script gives the additional pre-research when choosing a game with bases/advanced bases as opposed to no bases. I found that the files, rules.vlo and multiplay.vlo were the files that controlled this aspect and then copied the data from no bases (CLEAN MAP) and replaced the data for advanced bases (DEFENSIVE MAP) with it, as well as setting the NEXUS command centre as the command centre instead of the usual one (command STRUCTURESTAT "A0CommandCentreNE"). This brings me onto getting rid of the players' command centres, but keeping the spectators'.

The main problem here, was that flaME doesn't let you compile maps unless every player has a command centre. To remove the command centres, I had to set the default command centre (A0CommandCentre) to the RESEARCH MODULE type instead of the HQ type in structures.txt. Due to some maps being broken and not having their modules correctly partnered with the structure beneath them, a feature was put in place that removes the modules if the game can't find their owning structure (to prevent the game crashing completely, which it did before the fix).

This solved the problem of removing the command centre's on startup, but it meant that players could no longer build an HQ, which means no designing units, no defensive structures and no mini-map. Fortunately, any other HQ type structure, such as the NEXUS Command Centre from the campaign, enables the mini-map. All I had to do after that was change the name, model and associated research of the NEXUS Command centre to the original command centre. Finally, I added NEXUS command centres to the map for all of the spectators so that they started with a command centre.

And, that's about it. :)

In the future, the edited maps wouldn't need to be as large, since when flaME supports map scroll limits, the limits can be set to only cover the area that the players will be playing in.

Currently, I've only edited one map (urbanchasm, the map seen in the video) to work with the mod since it's more of a proof of concept than a proper mod.
You do not have the required permissions to view the files attached to this post.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
User avatar
Darks1de
New user
Posts: 1
Joined: 26 Mar 2010, 14:08

Re: Crude Spectator Mod (for 2.3.6)

Post by Darks1de »

Wow.... This is great :D
I Hope to see this mod progress to the point of usability on every map.
This can be a very helpful thing since wz doesnt have a replay system, and replays can be very helpful for new players to learn from experienced ones.
Image
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Crude Spectator Mod (for 2.3.6)

Post by NoQ »

Hmm, sounds like it works with no bases! o.O

P.S. A little wishlist here. I find it to be very good to record some of the league games on video from a spectator point of view. This might be really helpful for newbies, as Darks1de says, but the main problem here is that most league games are played with no bases, thus no pre-built uplink centers are possible. Then, i found it to be easy to make a cheating version of warzone client with a deity cheat built-in. But, unfortunately, i can't video capture on linux (proprietary ATI drivers are crap), and i couldn't compile warzone2100 for windows so far (too complicated for me, compiling on linux is much easier), so my problem still remains unsolved. If this mod helps, it'd be just great!
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Crude Spectator Mod (for 2.3.6)

Post by Mysteryem »

Playing advanced bases with this mod is the same a playing no bases, research wise, though the map would have to be edited so that there is only a command centre and trucks in the bases. It would be possible to have all of the base structures removed on load of the map by using the same method I used to remove the command centres, but it would mean doing a lot of editing to the research tree to make it work properly.

the newest version of flaME should work with scroll limits, so the spectators' bases can be completely hidden from view, or the game can be played with alliances on so that each of the players is allied to all of the spectators, this way, even artillery won't be able to shoot the spectators' buildings.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
User avatar
Arreon
Trained
Trained
Posts: 324
Joined: 15 Feb 2009, 05:57

Re: Crude Spectator Mod (for 2.3.6)

Post by Arreon »

Whenever I try to run the mod, I get a string-related error about something called "ECMturretmk1" or something like that. The error sounds quite easy to fix. If you can, can you post what to type in and where?

Or is the error more complex than it seems?
OS: Windows 7 Home Premium 64-bit
Processor: AMD Phenom II X6 1045T (6 CPUs), ~2.7GHz
Memory: 8192MB RAM
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Crude Spectator Mod (for 2.3.6)

Post by Mysteryem »

Arreon wrote:Whenever I try to run the mod, I get a string-related error about something called "ECMturretmk1" or something like that. The error sounds quite easy to fix. If you can, can you post what to type in and where?

Or is the error more complex than it seems?
It's because the mod uses the string file "name.txt" from version 2.3.6. It is easy to fix. Would you mind telling me which version you're trying to run the mod on?

Edit:You can now find converted maps here:
http://mysterymayhem.co.uk/specmod.htm
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
User avatar
Arreon
Trained
Trained
Posts: 324
Joined: 15 Feb 2009, 05:57

Re: Crude Spectator Mod (for 2.3.6)

Post by Arreon »

I'm using master-20110127. I hope that isn't a problem.
OS: Windows 7 Home Premium 64-bit
Processor: AMD Phenom II X6 1045T (6 CPUs), ~2.7GHz
Memory: 8192MB RAM
User avatar
Mysteryem
Global Moderator
Global Moderator
Posts: 728
Joined: 22 Sep 2008, 19:44
Location: UK

Re: Crude Spectator Mod (for 2.3.6)

Post by Mysteryem »

Arreon wrote:I'm using master-20110127. I hope that isn't a problem.
Yes, it definitely is a problem :).
Since funnily enough the mod was made for 2.3.6 and master has a lot of differences compared to it. (most noticeably the terrain renderer) I may update the mod for master, but I won't be supporting it long term, since this was made for the wz2100 league where the latest stable release is used for matches. And, in the future, trunk or 'master' might be getting a spectator mode or something similar.
"...If pure awesomeness were bricks, this would be the Great Wall of China...
The glory of this has collapsed on its self so far, that even the neutrons have collapsed."
User avatar
Arreon
Trained
Trained
Posts: 324
Joined: 15 Feb 2009, 05:57

Re: Crude Spectator Mod (for 2.3.6)

Post by Arreon »

Mysteryem wrote:
Arreon wrote:I'm using master-20110127. I hope that isn't a problem.
Yes, it definitely is a problem :).
Since funnily enough the mod was made for 2.3.6 and master has a lot of differences compared to it. (most noticeably the terrain renderer) I may update the mod for master, but I won't be supporting it long term, since this was made for the wz2100 league where the latest stable release is used for matches. And, in the future, trunk or 'master' might be getting a spectator mode or something similar.
Well, to my knowledge, no one else has even attempted any sort of spectator mod or feature but you.

You will be a hero if you can make a working spectator mod. :P

It will also be a very useful feature for AI developers, mod makers, and bored players like myself.

I like to watch :)
OS: Windows 7 Home Premium 64-bit
Processor: AMD Phenom II X6 1045T (6 CPUs), ~2.7GHz
Memory: 8192MB RAM