Enhanced SitRep Mod

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
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Enhanced SitRep Mod

Post by Shadow Wolf TJC » 14 May 2012, 04:52

Just a little side-project of mine that was created during development of my Contingency mod, the Expanded SitRep Mod was designed to provide players with a modified rules.js that would actually inform players of a wide variety of situations, such as:

- When an enemy unit or structure is detected, and whether the enemy is a Scavenger or an enemy player. (In 3.2, it would also tell if the enemy is an artillery unit/structure, a VTOL, or even an enemy transport.)
- When an Oil Derrick or Power Generator is under attack.
- When a unit or structure is destroyed. If it's an Oil Derrick, Power Generator, or LasSat Command Post, it'll play a special message.
- When the player is low on power, or doesn't have enough Power Generators to run all the Oil Derricks.
Enhanced_SitRep_Mod.wz
(45.14 KiB) Downloaded 708 times
Edit: At least 7 downloads already? What do you guys think about this? :3

If anyone's interested in incorporating this to the main game, or for any of their mods, here's the license that I'll be using for now:
Image
So feel free to incorporate this, though credit would be nice. :3
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 20 May 2012, 05:18

I've been playing around with this mod - love it!

What are the audio.wrf and audio.cfg files about? I really want to document them as I'm having a binge on all things audio at the moment... (:
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

iap
Trained
Trained
Posts: 244
Joined: 26 Sep 2009, 16:08

Re: Enhanced SitRep Mod

Post by iap » 20 May 2012, 21:52

I like it very much! I think it should be included in the game.

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Enhanced SitRep Mod

Post by Shadow Wolf TJC » 21 May 2012, 06:05

aubergine wrote:What are the audio.wrf and audio.cfg files about? I really want to document them as I'm having a binge on all things audio at the moment... (:
Some of the sounds that were used for this mod were included into base.wz, but were not loaded by the audio.cfg and audio.wrf files in base.wz, so I had to modify them, by adding in the missing sounds, to make them work.

Oh, and by the way, I couldn't have done it without all that JavaScript documentation that you did, so thanks. :D
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 21 May 2012, 17:28

Thanks for the info, I'll update the docs regarding the cfg and wrf files :)

Inspired by your mod, I'm developing a complete new version of rules.js (re-written from scratch) - will upload to this thread once complete.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
Shadow Wolf TJC
Regular
Regular
Posts: 1047
Joined: 16 Apr 2011, 05:12
Location: Raleigh, NC

Re: Enhanced SitRep Mod

Post by Shadow Wolf TJC » 22 May 2012, 06:23

Oh? What kind of rules.js are we talking about exactly?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 22 May 2012, 13:40

Well, so far I've done the following:

* Rewritten player initialisation code and split out in to separate rules.init.js
* Rewritten victory conditions code
* Created a throttled alternative to playSound() to make code cleaner
* Added about a dozen additional audio messages (eg. I can now detect when unit was recycled or structure demolished)
* Split out situation reporting in to separate rules.report.js

Example code from the new rules.js:

Code: Select all

function eventGameInit() {
	hackNetOff();

	// initialise all players:
	var player = maxPlayers;
	while (-1<--player) {
		// These functions and associated settings are defined in rules.init.js
		init.enableStructuresFor(player);
		init.enableComponentsFor(player);
		init.enableTechnologiesFor(player);
		init.setLimitsFor(player);
		init.applyBaseTypeFor(player);
	}
	applyLimitSet();
	
	// Set minimap and desgin based on presence of a HQ
	var state = (!!enumStruct(me, HQ).length);
	setMiniMap(state);
	setDesign(state);

	// This is the only template that should be enabled before design is allowed
	enableTemplate("ConstructionDroid");

	hackNetOn();
}
I'm just playtesting to make sure I've not missed any bugs - will upload later today.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Re: Enhanced SitRep Mod

Post by Reg312 » 22 May 2012, 14:21

may be you can implement my idea with game rounds? :)
viewtopic.php?f=30&t=9402#p102920
1) save start locations and start droids/buildings/feautes
2) when team wins - clear all and recreate objects from step1

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 22 May 2012, 16:05

@Reg312 - that won't be possible until Warzone 3.2 (some needed JS API functions not available in 3.1 branch).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 22 May 2012, 16:42

Here's version 0.8:
Enhanced_SitRep_Mod-v0.8.wz
Enhanced Situation Reporting v0.8
(20.13 KiB) Downloaded 339 times
Tested on Warzone 3.1 Beta 10, should work from Warzone 3.1 Beta 5 and above.

Known bugs:

* pcv634.ogg file not correctly defined (fixed in v0.9)
* design and minimap enabled before HQ is built (fixed in v0.9)


Reporting features:

* Players entering/exiting game
* Power status (low power, derrick required)
* Sensor reports (units/structures detected)
* Building construction
* Attacks (more descriptive reporting than usual)
* Recycling / Demolition
* Units/buildings destroyed
* Object transfers (including nexus link assimilation)

Refactored rules.js:

* rules.js is now a lot easier to read and understand
* rules.init.js contains all the settings/code for player initialisation at start of game
* rules.report.js contains all the situation reporting code

Current gripes:

* Several audio messages are hard-coded in to Warzone causing occasional message duplication
* Unable to determine scavenger player existence/defeat due to bugs in enumStuct() and enumDroid()

Future plans:

* Improve reporting based on turret types - eg. sensors, missiles, etc.
* When hard-coded messages removed from Warzone, implement better reports for production/research/etc.
* When enumStruct()/enumDroid() bugs fixed, require scavengers to be killed before winning game
* Update to allow player revival when alliancesType == ALLIANCES ?
* Split out victory conditions in to separate file (eg. to allow Reg312's request or custom victory conditions)
Last edited by aubergine on 22 May 2012, 21:12, edited 1 time in total.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 22 May 2012, 21:12

Version 0.9 fixes two bugs that were found in v0.8:

* Designer and minimap now require HQ to be built
* pcv634.ogg ("incoming air strike") now correctly defined in audio.wrf and audio.cfg
Enhanced_SitRep_Mod-v0.9.zip
Enhanced Situation Reporting v0.9
(20.17 KiB) Downloaded 344 times
Get it while it's hot :)

Known bugs:

* http://developer.wz2100.net/ticket/3506 (will add Shadow Wolf's workaround to v0.10)
Last edited by aubergine on 23 May 2012, 02:48, edited 1 time in total.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 22 May 2012, 22:28

@Shadow Wolf: What do you think of the revised format of rules.js and associated scripts?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Enhanced SitRep Mod

Post by aubergine » 24 May 2012, 06:19

v0.10 is here!
Enhanced_SitRep_Mod-v0.10.zip
Enhanced Situation Reporting v0.10
(80.81 KiB) Downloaded 437 times
This is a massive update!

* About 20 new report events
* Droid commanders now have a voice!
* Randomising of audio messages (where applicable)
* All known bugs fixed
* rules.report.js completely re-written
* New rules.report.msg.js defines all messages
* Several completely new audio files

This update also includes new object classification code and message searching - it's now easy to add lots of new messages with defaults, etc.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO

KEN+J
Trained
Trained
Posts: 34
Joined: 31 Jul 2011, 21:54

Re: Enhanced SitRep Mod

Post by KEN+J » 27 May 2012, 03:40

Can you make versions 0.9 and 0.10 of this mod the same as you did for version 0.8?

User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: Enhanced SitRep Mod

Post by Goth Zagog-Thou » 27 May 2012, 05:33

Great work, Aubergine. :) Will test this immediately. Love this mod and everything it stands for.

Post Reply