Modding help, again...

  • IlikeUssr
    9th January Member 1 Permalink

    I'm sorry for posting too much, but I need some help with modding. I'm working on COPR, (basic color is #B87333, this is important) copper right now and I wanted my copper to:
    - Increase tmp by 1 when in contact with OXYG
    - Change it's color to #9C7147 when tmp is 1
    - Change it's color to #7D715A when tmp is 2

    - Change it's color to #4E7566 when tmp is 3

    - Change it's tmp to 0 when it's temp is 1353k (this value is important) 

    - Be unable to increase it's tmp when with ctype (WAX)

    If you know how to do things like this, please reply or PM how to. I will propably be inactive until 13.01.2021

  • phox
    11th January Member 0 Permalink

    are you using LUA or are you compiling the source

  • IlikeUssr
    11th January Member 0 Permalink

    This non LUA way

  • CactusHamster
    12th January Member 0 Permalink

    First, that's compiling the source. 


    Second, in the update function, maybe if its neighbor elements include OXYG or LOXY or SLTW, it has a 1/100 chance to turn the tmp of the particle up for each frame, and a 1/25 chance to raise its tmp by 1 if the copper particle's tmp next to it is bigger. And in the graphics function, if the ctype is not wax, if the tmp is 1, change the color to the first level of oxidation, for a tmp of 2, change it to the second color of oxidation, etc. And then when it's at 1353K, just change the tmp to 0.


    It's not hard to do if you know what you're doing. If you don't, I recommend first learning how to use C++, compile C++, and use TPT's functions.

  • IlikeUssr
    12th January Member 0 Permalink

    Man thanks, but could you give me some code how to do it?

    I mean this part when it raises it tmp when oxyg is near and this color part

    Edited once by IlikeUssr. Last: 12th January
  • CactusHamster
    12th January Member 0 Permalink

    @IlikeUssr (View Post)

     I'll do what I can, but it might not be too efficient. I *very* rarely use C++ for TPT mods, simply because of the compiling time and how hard it is to distribute and store.


    1/13/21 (Editing so that I don't add an unneeded piece): Looks like your mod idea and my lua script used the same color!

    Edited once by CactusHamster. Last: 14th January
  • IlikeUssr
    13th January Member 0 Permalink

    Hmmm, ok. Thanks for help tho.