Jump to content

[TD] Solar Power Plant WIP & Cost hex editing randomly


Kilkakon

Recommended Posts

...until I realised that the whole point of remaking my website was to promote my C&C mod, and I have buildings missing that I should kinda finish before taking screenshots and doing tech trees. Great work Kilk. :P

 

So I had another bash. Funnily enough though, this is almost a 2x1 building due to the 34 degree angle that it's got. It's square on a bird's eye view but not so here. Still, comments and criticism welcome. I'm thinking of replacing the brown tower with a player controlled gantry (similar to the communications centre).

solar2.png.e46d3b3a23865acc98fea8c5a8573d15.png

Link to comment
Share on other sites

  • 1 month later...

Haha so it could be a... medium tank? :laugh:

 

Thank you White. :D And thanks for being an awesome spriter too--your oil refinery was a great base for mine and I ended up using your light tank turret for my light tank too, so cheers :)

Link to comment
Share on other sites

Thanks man... I drew all the stuff pixel by pixel just editing other SHPs and parts of SHPs that were similar to what I wanted... very fricken time consuming.

The oil refinery was really fun to make. I actually made all the little separate bits and then fitted it all together, hehe. Was quite funny having a big sheet with all the bit of it spread out on.

Believe it or not, I actually found the icon image for it on google images and then built the refinery based on that picture. Which is why it has such a sweet icon, too! xD

  -Liam

Link to comment
Share on other sites

That is, fortunately, easily changable. I decided to use the normal power plant's base rather than the one I had drawn before. I can round off the edges though no worries.

 

The tear gas infantry are functionally the same as Chem-warriors, with the same damage and rate of fire. The only difference is that they can't cost more than $127 and that they like to go prone more often than regular troops. I was thinking of asking you if repoints for cost were possible when the mod was finished.

Link to comment
Share on other sites

Cost change should be possible, yes... either by jumping out and back, or by changing some other value on the unit to make it smaller to compensate. Either one is a messy operation, though.

 

I've quickly looked into it, and the jumping method is definitely the simplest of the two. Since there is no open space anywhere near that point, though, it'd require a long jump (5 bytes) to even jump out of the code there, which means that 3 of the properties at that point (each 2-byte 'push' commands) would need to be wiped and moved to the new location to put the jmp command there.

 

The bytes to change would be:

 

The actual jump to available space:

Address 3ED99 (EIP=44E999)

E9 B4 FA FF FF - jump to the new location

90 - 'No Operation' command - to align to 6 bytes (not really necessary, but it's cleaner :P)

(this removes the Cost, Sight and Hit Points options at this point)

 

The moved and expanded code:

Address 3E852 (EIP=44E452)

68 FF FF FF FF - migrated and expanded Cost value. Replace the "FF FF FF FF" by your new cost (bytes reversed, as usual)

6A 00 - migrated Sight value (which is probably already changed from 00 in your mod)

6A 32 - migrated Hit Points value (which is probably also changed from 32 in your mod)

E9 3F 05 00 00 - the jump back to resume the original code

 

 

The code:

#eip=0044E999 ; 3ED99
jmp 0044E452 ; jump to nearby unused space
nop ; no operation
; label indicating the jump back location
jumpback:

#eip=0044E452 ; 3E852
push    FFFFFFFFh ; new cost
push    0 ; sight
push    32h ; hit points
jmp .jumpback

 

Not sure about the "going prone" thing, though. The only thing related I know is the "wandering" behaviour civilians have, which is enabled/disabled for C10 by the value at address 3EDAF.

Link to comment
Share on other sites

Oh wow, that's awesome Nyer. :) Thanks for putting that information there... I will have to study it and apply it to all civilian units and buildings I have recycled. :O There's like, a good 5-7 buildings that I have reused... this will be amazing to have working! :D Thanks so much. I'll have to be careful and do it carefully, one at a time though.

 

As for the "going prone" behaviour, I have disabled the civilian and "wanderer" flags. The result is that, they'll behave normally, but as soon as they are damaged, they'll permanently go prone. They can be double-moved out of it like all infantry, but they'll go back to prone when they finish the move. It's not really a bad thing though as they kinda survive longer like that, haha.

 

Would you prefer smoothed out corners on the plant's base?

Link to comment
Share on other sites

Oh wow, that's awesome Nyer. :) Thanks for putting that information there... I will have to study it and apply it to all civilian units and buildings I have recycled. :O There's like, a good 5-7 buildings that I have reused... this will be amazing to have working! :D Thanks so much. I'll have to be careful and do it carefully, one at a time though.

That's not so easy... you'd need to find open space to migrate the code for every one of those.

 

Do you have the asm tool? You can download it here. Note that you have to make a "project" before it allows you to convert code to bytes -_-

 

As for the "going prone" behaviour, I have disabled the civilian and "wanderer" flags. The result is that, they'll behave normally, but as soon as they are damaged, they'll permanently go prone. They can be double-moved out of it like all infantry, but they'll go back to prone when they finish the move. It's not really a bad thing though as they kinda survive longer like that, haha.

Oh. I've seen that happen in RA1 too. Really annoying.

 

Would you prefer smoothed out corners on the plant's base?

Actually, yes... the round base made it really fit under the quarter-circle of solar panels.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...