Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Rikiki on December 29, 2014, 05:57:11 PM

Title: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Rikiki on December 29, 2014, 05:57:11 PM
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!".
(http://i.imgur.com/IwX0DHY.png)

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:
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


Showroom

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

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

Alert is too long? ??? shhh, it's a surprise... ;D
Spoiler... (http://i.imgur.com/fjk2yKZ.png)

And a small story...
=> Alert speaker in action! <= (http://imgur.com/a/v8Ytu) 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

Changelog

Code: [Select]
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 (https://ludeon.com/forums/index.php?topic=8375.0) mod.
You need to activate Common mod first, for example:
- M&Co. Common
- M&Co. AlertSpeaker


Credits

LowDangerAlarm.wav: see this page (https://www.freesound.org/people/rene___/sounds/56778/).

Modders note

You may be interrested in the following features:

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/ (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 (https://www.sendspace.com/file/z58lby)
M&Co.: Common V10.0 source (https://www.sendspace.com/file/w4vsuz) => for modders

M&Co.: AlertSpeaker V10.0 (https://www.sendspace.com/file/8lce3t)
M&Co.: AlertSpeaker V10.0 source (https://www.sendspace.com/file/roo9j9) => for modders


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

[attachment deleted due to age]
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: 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
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: 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. ???
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: pktongrimworld on December 30, 2014, 01:03:47 PM
not having a problem with lag.
(but then again, my comp is a high end gaming rig...)

but... we want lasers!
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: bullet on December 30, 2014, 01:23:44 PM
nice-nice-nice!!!

but... we want lasers!
and  yes-yes-yes!!!

WE WANT MORE! )  Thanks Rikiki
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: W1Z25 on December 30, 2014, 04:18:03 PM
ill give this as try
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: Shadow3pl on December 30, 2014, 05:31:02 PM
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 :(
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: Igabod on December 30, 2014, 06:50:32 PM
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.
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: 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)
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: Rikiki on December 31, 2014, 05:53:05 AM
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
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: W1Z25 on December 31, 2014, 10:38:28 AM
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.
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: SabakuOokami on December 31, 2014, 01:14:22 PM
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
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: Rikiki on January 01, 2015, 05:22:53 PM
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! :)
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: pktongrimworld on January 01, 2015, 09:23:30 PM
the simplified verison dll replaces the one in mod in the pack right?
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: SabakuOokami on January 01, 2015, 10:09:49 PM
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...)
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: Rikiki on January 02, 2015, 03:57:07 AM
Sorry for the lack of info, I have added the steps to place the .dll in the right place. :)
Don't forget to remove (backup!!!) the standard .dll from the Assemblies folder.

If this solves some people' lags problem, I will add a button to disable dynamic lights.
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (V2.0 29-12-2014)
Post by: Rikiki on January 02, 2015, 05:54:33 PM
I just updated the basic laser weapons (laser rifle, prism rifle and laser gatling) to Alpha 8.

I will now work on the heavy lasgun to improve it. :)
I am undecided about the high precision lasgun. :-\ It seems to be too OP and it takes a lot of coding effort just to maintain a nice looking warmup animation...
Title: Re: [MOD](Alpha 8) Mining&Co.: Security enforcement (laser weapons)(V2.1 02-01-2015)
Post by: pktongrimworld on January 02, 2015, 06:15:35 PM
woot.


Well, lasers are precise...so....

kind of redundant lore wise :P

maybe a "high power Laswer Cannon" or something.

but you wouldnt use that against people... hint hint.
Title: Re: [MOD](Alpha 8) Mining&Co.: Alert speaker (V2.1 03-01-2015)
Post by: DroneKiller320 on January 08, 2015, 04:23:18 AM
Im a little confused, do I download both conmen and the source or only one of them
Title: Re: [MOD](Alpha 8) Mining&Co.: Alert speaker (V2.1 03-01-2015)
Post by: Rikiki on January 08, 2015, 04:43:56 AM
Im a little confused, do I download both conmen and the source or only one of them

The "source" link is only useful for modders as it contains the source code of the mod.
If you only want to play, grab the "M&Co.: Common V4.0" and "M&Co.: AlertSpeaker V2.1" mods.
Remember to activate M&Co.: Common before M&Co.: AlertSpeaker. ;)
Title: Re: [MOD](Alpha 8) Mining&Co.: Alert speaker (V2.1 03-01-2015)
Post by: Ora on January 31, 2015, 04:37:15 PM
Downloaded this and modified it a little bit to make a good old fashioned air raid siren noise instead of the default alarm noises. It's working fine but the lights are giving me lag even after installing the static lights .dll. If I toggle the power off of the speaker my screen scrolls fine. If I toggle the power on the screen scrolls fine and then starts to go choppy as soon as the light blinks on. Is there a way I can just remove the light altogether? I don't really want the light, I just wanted an air raid siren for my colony that goes off in the event of an enemy raid.
Title: Re: [MOD](Alpha 8) Mining&Co.: Alert speaker (V2.1 03-01-2015)
Post by: Rikiki on February 01, 2015, 08:31:38 AM
Here is a version without any light (https://www.sendspace.com/file/fr3ncl). There will not be much support for it however. :-\

Quite strange you have lags. Are you playing on a low-end PC? Got no lags with more than 30 alert speakers on my screen...
Have you lags only when they are visible? Too when you don't see them?
I would like to correct it if possible. :)
Title: Re: [MOD](Alpha 9) Mining&Co.: Alert speaker (V9.0 25-02-2015)
Post by: Rikiki on February 24, 2015, 07:21:52 PM
Updated for Alpha 9.
Title: Re: [MOD](Alpha 9) Mining&Co.: Alert speaker (V9.0 25-02-2015)
Post by: jabbamonkey on February 27, 2015, 03:03:54 PM
I added some alternative textures on my graphic overhaul (https://ludeon.com/forums/index.php?topic=10895.msg108829#msg108829) post.
Title: Re: [MOD](Alpha 9) Mining&Co.: Alert speaker (V9.0 25-02-2015)
Post by: Agent32 on March 01, 2015, 12:58:30 AM
I have fps decreases too, in any state of alert work.
PC conf: amd5500(512), 2.8x2GGH, 8ram.
Helmet mod at night also decreases fps, but much less.
I think its all about something visual effect, maybe ati cant work with him properly.

Also yours mods - great work!
Title: Re: [MOD](Alpha 9) Mining&Co.: Alert speaker (V9.0 25-02-2015)
Post by: Razul Antiwield on March 26, 2015, 06:20:29 AM
I would have this, however I do not at all like the idea of the adrenaline boost. Anyway the Miscellaneous mod already has something like this.
Title: Re: [MOD](Alpha 9) Mining&Co.: Alert speaker (V9.0 25-02-2015)
Post by: Rikiki on March 27, 2015, 08:38:00 PM
I would have this, however I do not at all like the idea of the adrenaline boost. Anyway the Miscellaneous mod already has something like this.
If you don't like it... don't use it! :D
I don't see what Miscellaneous' content is the same. ??? The tactical computer has not the same functionalities at all!
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Rikiki on April 28, 2015, 06:27:10 PM
Updated for Alpha 10!
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Ihatetheinternet on April 28, 2015, 09:56:02 PM
Can i change the siren sound i will not upload it
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Rikiki on April 29, 2015, 02:51:30 AM
Can i change the siren sound i will not upload it

Of course you can! :)
If you believe your sound is better, why not post it so others can benefit from it? Mind the credits of this sound though.
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: skyarkhangel on May 06, 2015, 10:31:39 PM
He does not want to put on the wall. I turned off game, then on again - does not want. Then again start... he turned on  :o
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Rikiki on May 07, 2015, 02:16:56 AM
He does not want to put on the wall. I turned off game, then on again - does not want. Then again start... he turned on  :o
Sorry but I don't really understand your problem... ???
Could you post a screenshot please?

The alert speaker is "hooked" on a wall so it must be placed in an adjacent cell of a built or natural wall.
I hope it is clear with the first post screenshot. :)
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: skyarkhangel on May 09, 2015, 07:29:07 AM

Sorry but I don't really understand your problem... ???
Could you post a screenshot please?

The alert speaker is "hooked" on a wall so it must be placed in an adjacent cell of a built or natural wall.
I hope it is clear with the first post screenshot. :)
[/quote]

Sorry, It was a conflict with some mod, now everything works fine.

Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Delekhan on May 16, 2015, 04:09:25 PM
This won't work with the walls from Superior Crafting. They're considered different from the Vanilla walls since they upgrade themselves with research.

How do I make the alert speaker attach to modded walls?
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: Rikiki on May 16, 2015, 06:40:21 PM
This won't work with the walls from Superior Crafting. They're considered different from the Vanilla walls since they upgrade themselves with research.

How do I make the alert speaker attach to modded walls?
This is coded in the dll part of this mod.
You must modify the Building_AlertSpeaker.CheckIfSupportingWallIsAlive function. Add an additional check on the Superior Crafting wall definitions (it currently checks the supportive wall is a vanilla one or a natural block).

Here attached is a dll which *should* work. ::)
I will however not support this version...

[attachment deleted due to age]
Title: Re: [MOD](Alpha 10) Mining&Co.: Alert speaker (V10.0 29-04-2015)
Post by: skyarkhangel on May 16, 2015, 08:43:41 PM
This won't work with the walls from Superior Crafting. They're considered different from the Vanilla walls since they upgrade themselves with research.

How do I make the alert speaker attach to modded walls?
This is coded in the dll part of this mod.
You must modify the Building_AlertSpeaker.CheckIfSupportingWallIsAlive function. Add an additional check on the Superior Crafting wall definitions (it currently checks the supportive wall is a vanilla one or a natural block).

Here attached is a dll which *should* work. ::)
I will however not support this version...

I also had a problem with SC. But, i decided it another way, modifying SC. SCWall -> Wall.