[MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)

Started by Rikiki, December 29, 2014, 05:57:11 PM

Previous topic - Next topic

Rikiki

Mining&Co.: Alert speaker


  Dear customers, some of you recently reported a bounce of pirate activity in the rim sector. Mining & Co. is always trying to get its customers happy and "A dead customer is a bad customer!".

  • With our new alarm system, the alert speaker, you will never get cought sleeping in your bed during a pirate raid! (a light system is also provided for deaf people).
  • Once a threat has been detected, the Mining & Co. advanced laser weapons will tear it down quickly. => please see this thread


Features

The alert speaker device as its name indicates will warn you of a threat. According to the current level of danger, the alert speaker will emit a light and a siren sound:

  • No danger: green light, no sound
  • Low danger: yellow waving light, 2 loud sirens
  • High danger: red flashing light, 4 alert sirens
As every good manager knows, stressing your employees makes them work harder and faster (joking! ;D).
It is the same for your colonist when they have to defend their lives!
=> a low or high level of danger provides your colonists a bonus of speed and aiming time as well as a boost of adrenaline.
Warning! Prolonged exposition to danger tends to tire up your workers!

User manual


  • Research the integrated circuits from the M&Co. Common mod.
  • Build an Alert speaker near a wall/rock (located in the Security architect menu).
  • When an alert occurs and the alert speaker is powered, nearby colonists will get adrenaline bonus.

Showroom

Small adrenaline bonus:
http://i.imgur.com/2W1bvlK.png
http://i.imgur.com/0658oOi.png

Medium adrenaline bonus:
http://i.imgur.com/5LOOCz3.png
http://i.imgur.com/P9LHr7H.png

Alert is too long? ??? shhh, it's a surprise... ;D
Spoiler...

And a small story...
=> Alert speaker in action! <= 8)

Technical support

Mining & Co. is continuously trying to improving its product to raise its customers satisfaction.
Please leave us our feedback. Balancing cannot be done without you, loyal customer!

Next steps

  • Update the laser weapons [partially done]
  • Balance improvements based on your feedbacks!

Changelog


V2.1
* Splitted M&Co. Security enforcement into M&Co. AlertSpeaker and M&Co. Weapons for easier maintainability.
* Minro typo corrections.

V2.0
* Alert speaker updated to Alpha 8.
* Improved graphics and add of custom motes.

V9.0
* Alpha 9 update (decided to change the version number to reflect the current Alpha).

V10.0
* Alpha 10 update



Compatibility notes

Mining & Co. is trying to make its mods modular. However, you need the Mining & Co. Common mod.
You need to activate Common mod first, for example:
- M&Co. Common
- M&Co. AlertSpeaker


Credits

LowDangerAlarm.wav: see this page.

Modders note

You may be interrested in the following features:

  • Mood and apparel (bonus/malus stat) management
  • Use of dynamic glowers
  • Use of custom motes

License

You are free to get inspiration from this little work and include it in any other mod/modpack. Just put a link to this thread so people can use it as a standalone version too.
So this is basically licensed under http://creativecommons.org/licenses/by/4.0/.

Note to modpacker: not that I don't want to help, but I have very little time to mod/play so I may not be very fast to answer integration questions.


Download

Starting a new world/colony is NOT required!
M&Co.: Common V10.0
M&Co.: Common V10.0 source => for modders

M&Co.: AlertSpeaker V10.0
M&Co.: AlertSpeaker V10.0 source => for modders


If some people need a version without glowers, or static lights, I can provide another simplified version.

[attachment deleted due to age]

Zeni

The lights on this make my game lag while powered. its not my system specs i think theres a problem with the game processing the lights somehow

Rikiki

I just tested with a low-end PC and did not had lags with more than 25 alert speaker shouting.
Does anyone else have lag problem?

The lights are just glowers whose range is dynamically changed. It should not be too much CPU consuming. ???

pktongrimworld

not having a problem with lag.
(but then again, my comp is a high end gaming rig...)

but... we want lasers!

bullet


W1Z25


Shadow3pl

Quote from: Zeni on December 30, 2014, 08:51:17 AM
The lights on this make my game lag while powered. its not my system specs i think theres a problem with the game processing the lights somehow

lags :(

Igabod

I only just now noticed that this was a different topic than the mineral sonar one. Almost didn't get added to the mod list, but I'm going to go do that right now. Sorry about that.

W1Z25

i've had 2 bugs with this

1. first time starting up a save with this.. i had no sound at all. (restarted and all was well)

2. after about an hour on that save my people almost all died because path finding just stopped working in my base (not sure if it was this mod or what, but i havent had any issues until then) (loaded an auto save and deleted every door in my base, and then the issue was fixed)

Rikiki

Quote from: W1Z25 on December 30, 2014, 10:34:57 PM
i've had 2 bugs with this

1. first time starting up a save with this.. i had no sound at all. (restarted and all was well)

2. after about an hour on that save my people almost all died because path finding just stopped working in my base (not sure if it was this mod or what, but i havent had any issues until then) (loaded an auto save and deleted every door in my base, and then the issue was fixed)

Mmh, thanks for the report but I doubt this mod is causing this. There is really no path alteration within this mod, only stat bonus/malus.
As for the sound, I already noticed this strange bug occasionaly occurs WITHOUT any mods.
So I believe I am safe here! :D

W1Z25

Quote from: Rikiki on December 31, 2014, 05:53:05 AM
Quote from: W1Z25 on December 30, 2014, 10:34:57 PM
i've had 2 bugs with this

1. first time starting up a save with this.. i had no sound at all. (restarted and all was well)

2. after about an hour on that save my people almost all died because path finding just stopped working in my base (not sure if it was this mod or what, but i havent had any issues until then) (loaded an auto save and deleted every door in my base, and then the issue was fixed)

Mmh, thanks for the report but I doubt this mod is causing this. There is really no path alteration within this mod, only stat bonus/malus.
As for the sound, I already noticed this strange bug occasionaly occurs WITHOUT any mods.
So I believe I am safe here! :D

im not sure either, it is a save with 7 other mods already on it before.

SabakuOokami

Quote from: Rikiki on December 30, 2014, 10:39:26 AM
I just tested with a low-end PC and did not had lags with more than 25 alert speaker shouting.
Does anyone else have lag problem?

The lights are just glowers whose range is dynamically changed. It should not be too much CPU consuming. ???

It may be the fact it 'dynamically changes' that causes the lag in the game. The lights, I think, weren't meant to do that in the game. So since there are now lights in the game that does it... it takes the game/cpu extra time to process them.

Fortunately, the speakers still work without power and the light off. (Surprisingly)

You could make 2 versions to keep people relatively happy. 1 with the dynamic lights, the other with static lights that do the same (but without the constant change in range)

It's not a lot of work to do it (If you don't want, not powering them still works  ;D ) and since it's technically not a bug, it's just something that people's computer's can't keep up with.
Though I think the lag comes with the game constantly checking the speakers if the light needs to 'dynamically change' even when it's green.

25 speakers... and no lag?

Where did you find this low-end super computer? :P

Rikiki

You always hear the alert speaker (even when no alert speaker is powered) because sound is treated staticaly (it plays only 1 sound for all the alert speakers, not 1 per instance).
It is the same principle for the glowers radius (graphic parameters are computed only once for all alert speaker instances). :)

The glower components are a core functionality. I just modify their parameters each tick when necessary. The rendering of dynamic glowers may be causing lags but not the "game constantly checking the speakers...". The game actually performs soooo many actions every tick that my little treatment is a drop in an ocean! :D

Anyway, as requested I attached a simplified version of the .dll with static lights at the end of the main post. Please test it. I am curious to see if this stops lags... ???

I am awaiting your feedback! :)

pktongrimworld

#13
the simplified verison dll replaces the one in mod in the pack right?

SabakuOokami

I put the static lights in what I 'think' was the right folder. (The assemblies folder within the mod folder, right?)

If that was the right spot, it didn't cause static lights, the lights still acted the same, with the same lag.
(Started a new world/colony just in case as well) (renamed it to the file that was in the folder, unsure if it was supposed to replace it or not. Even tried it with both in the folder together.)

So either I put the .dll file in the wrong folder or it's not working somehow. (I believe I put it in the wrong folder...)