[Mod Help] need help with c# codes

Started by Rune1993, September 06, 2020, 09:10:50 AM

Previous topic - Next topic

Rune1993

hi there are some add on's i want to do for my mod i was told on another forum i need c# to do it i downloaded visual studios 2019 all i want to add is a red colour water with a burn effect when walked on other than a bridge.

Thing is i would not know what code to look for or change to make the water red and next is the same with the burn effect either of these code's i do not know never used c# or visual studio before .

and my learning difficulties would make it harder for me another is the code for a healing effect i want to make a healing spring with a minor healing effect not to much as dont want to get rid of doctors so only minor healing.

the codes to do this i would not know can anyone help thank you.

RawCode

post your code and explain what is wrong.

if your code have no trace output, add trace output and try again before posting.

if you don't know what is trace output, please read any generic article about trace output anywhere, it's same for any language and exists from very moment of creation of computers.

Rune1993

Quote from: RawCode on September 09, 2020, 06:22:24 AM
post your code and explain what is wrong.

if your code have no trace output, add trace output and try again before posting.

if you don't know what is trace output, please read any generic article about trace output anywhere, it's same for any language and exists from very moment of creation of computers.

Thank for replying anyway but i am asking for help with what codes i need not help with a code i have done but again thanks anyway i wouldn't know the first thing on what i need to do to make the water a different colour like red or give it a minor burn effect that burns any who walk on it.

Basically all i will do is copy the code and stuff for the shallow water floor i have done already for the main mod rename the new water floor to Blood Water since this will be a add on to the main mod not replacing it.

Then add the code if anyone gives me it to change the colour to red and the code that adds the minor burn effect when its done ile add it to a copy of the main mod file to test if it shows in game as a separate floor. And works and the burn effect works i just need to know the code that will let me do that or how to find it.

same with the healing effect code so i can add a healing effect to another when i do it though i dont plan on doing it yet since ive just done a update other day i added fertile water.

But here is a look at my main code anyway where i would add the code for making the water red and adding the burn effect well if adding a burn effect is possible but i definatly think turning it red is possible.

code -
 
<TerrainDef ParentName="WaterShallowBase">
    <defName>RuneWaterShallow</defName>
    <label>shallow water</label>
    <texturePath>Terrain/Surfaces/WaterShallowRamp</texturePath>
    <waterDepthShader>Map/WaterDepth</waterDepthShader>
    <renderPrecedence>394</renderPrecedence>
     <costList>
      <WoodLog>2</WoodLog>
     </costList>
     <designationCategory>Floors</designationCategory>
   <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <layerable>true</layerable>
  </TerrainDef>

RawCode

this is not code.

try starting from here:
https://ludeon.com/forums/index.php?topic=3408.0

performance is not issue for starting mods, but take in account tickrate of 60 ticks per second, it's quite high value, MC have 20 and WC3 have 24, there are many games with tickrate of 10 and less.

Rune1993

Quote from: RawCode on September 10, 2020, 05:33:00 AM
this is not code.

try starting from here:
https://ludeon.com/forums/index.php?topic=3408.0

performance is not issue for starting mods, but take in account tickrate of 60 ticks per second, it's quite high value, MC have 20 and WC3 have 24, there are many games with tickrate of 10 and less.

ile take a look but most likely wont get it that well still i got learning dificulties understanding this was already hard enough.