Change temperature based on how deep in a mountain you are?

Started by warlocke, July 29, 2015, 08:44:52 PM

Previous topic - Next topic

warlocke

I noticed in parts of my mountain base that are DEEP in the mountain, the temp is still the same as outside (Misc hallways I carved to get to silver and have not used those areas yet.) IRL Caves stay around 60-80F year round. Is there a way to mimic this or is it even doable? I am willing to try to learn how to make it, just not sure where to start with a temperature change.

Thanks.

Tynan

Temperatures are stored in the room. To get the room from a cell, use GetRoom(). To change the temperature, set room.Temperature.

As for determining how and when to cool the deep rooms, and how to determine which rooms are deep and how deep they are, that's a tough problem I leave to you :) You probably want to make a MapComponent and run it from there though.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

warlocke

Thank you for your reply sir. May I ask, what file has some default room defs that I may look at and see how its formatted? If I can see a file layout/commands I can more than likely string something together, just need to see the basics first. (have not coded stuff in a long time, since RunUO came out for ultima online lol) Thanks again.

Tynan

You need to decompile the code and start reading and searching through it yourself.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

warlocke

Ok, wasnt sure if it was xml or in code. I will do that. Thanks sir.

warlocke

Ok, I have a partially working script thanks to 1000101 on the slack chat who is helping me get this going. Right now the script detects heaters, camp fires, and such in the rooms and will disable the cave temp. however we cannot find a way to search adjacent cells for coolers and such since they are technically not in the room. Does anyone know of a way to do this?


1000101

After talking with skullywag on slack, I have an idea to get the list of coolers then check room adjacency.  I'll try when I get home later.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

TheGentlmen

Quote from: Tynan on August 01, 2015, 12:39:01 AM
You need to decompile the code and start reading and searching through it yourself.
How do you decompile code?

1000101

With tools such as ILSpy or jetBrains dotPeek.  Personally I prefer dotPeek over ILSpy, but they do the same job.

Also, Haplo wrote an excellent tutorial for modding in this thread.  Don't be put off by how complex it may seem.  Things are always more difficult when looking in from the outside, once you start playing around (and don't be afraid to!), they become much easier.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By