Enhanced SitRep Mod
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Enhanced SitRep Mod
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. Edit: At least 7 downloads already? What do you guys think about this?
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:
So feel free to incorporate this, though credit would be nice.
- 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. Edit: At least 7 downloads already? What do you guys think about this?
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:
So feel free to incorporate this, though credit would be nice.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Enhanced SitRep Mod
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... (:
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
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
I like it very much! I think it should be included in the game.
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Enhanced SitRep Mod
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.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... (:
Oh, and by the way, I couldn't have done it without all that JavaScript documentation that you did, so thanks.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Enhanced SitRep Mod
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.
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
-- https://warzone.atlassian.net/wiki/display/GO
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Enhanced SitRep Mod
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
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Enhanced SitRep Mod
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:
I'm just playtesting to make sure I've not missed any bugs - will upload later today.
* 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();
}
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
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
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
Re: Enhanced SitRep Mod
@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
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
Here's version 0.8:
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)
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
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
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
Get it while it's hot
Known bugs:
* http://developer.wz2100.net/ticket/3506 (will add Shadow Wolf's workaround to v0.10)
* Designer and minimap now require HQ to be built
* pcv634.ogg ("incoming air strike") now correctly defined in audio.wrf and audio.cfg
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
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
@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
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
v0.10 is here!
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.
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
-- https://warzone.atlassian.net/wiki/display/GO
Re: Enhanced SitRep Mod
Can you make versions 0.9 and 0.10 of this mod the same as you did for version 0.8?
- Goth Zagog-Thou
- Regular
- Posts: 1582
- Joined: 06 Jan 2007, 08:08
- Location: Delta Base
- Contact:
Re: Enhanced SitRep Mod
Great work, Aubergine. Will test this immediately. Love this mod and everything it stands for.