Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
peterthepigeon

C&C95 Rules.ini

Recommended Posts

So now that my account is back and recovered.  I'm starting a project to allow you to edit unit values as you would in RA, TS, etc.  I may make a repo for the project, I haven't decided yet.  Right now I'm just in the planning phase of the project, doing some UML, etc.

The actual project will be coded in C++, and make use of regex, along with std::map and std::vector.  For a project of this complexity, a parser is not required.  Boost may be used, although maybe not as the STL provides everything I need.  I plan to have a worker thread running every so often to query changes to the file and spit out any inconsistencies.  In other words, you'll be able to alt tab out of the game to edit values on the fly and if it causes potential inconsistencies, they'll be discarded and the file overwritten with the last stable changes.

It would be tempting to hardcode offsets and the like into the .dll itself, however, for ease of modification, simplicity sake and ease of development, I think I will simply keep it to .ini files.  I plan to add a detours.ini, or something where you specify an offset, a detour type, or a modification in assembly and whether you allocate to a new RWX section or overwrite the opcodes in the .text section.  I could use the heap for this, and then call VirtualProtect to mark the page RWX, however, I am not in 'love' with the idea, nor just willy nilly throwing out 4096 byte allocations.  A memory manager seems most appropriate.

This thread will be updated as I work on the project.

Share this post


Link to post
Share on other sites

Editing unit stats already can be done in TibEd, what will be the difference in your project?

Edited by Messiah

Share this post


Link to post
Share on other sites

This sounds vaguely like a DLL injection project, similar to what ares (YR) or thyme(Zero Hour, my own project) do to inject their own code. It sounds over the top with its modifications though, allocating heap for custom code? Just reimplement functions you care about in C++ and then set jumps in the original code to go to them. Compile the whole thing with open watcom and you won't even need to write shim inline assembly to account for different calling conventions either. I've recently been experimenting with injecting a dll into RA, so I know this can work and indeed does work very well.

Share this post


Link to post
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
Sign in to follow this  

  • Similar Content

    • By scut
      Hi all
      I'm now knee-deep in TD SP mapping and am starting to run into questions that I can't answer via Nyerguds guide, opening the default maps or a lot of googling.
      Is there anyway to improve the AI on gunboats? They seem to find one target and fixate on it until it's dead. If it moves out of range they won't change target to anything else. This is on the "Hunt" AI used by gunboats in all the campaign maps. I've tried putting gunboats in a difference House (Multi3) and using "All to Hunt" on them to refresh their AI state and hopefully get them to re-target, but "All to Hunt" kicks in for every AI unit in every House.
      I've also tried creating them as a teamtype and giving them MOVE-HUNT-MOVE-HUNT instructions to try to refresh their AI (I had hoped they would ignore the move instructions), but that just results in them swanning around in the water in a really weird manner.
      I'm unsure where newly built Orca's will arrive from? I have a House (located SE map corner) where the reinforcement edge is set to South, but Orca's seem to come in from the right side of the map, or from the top-right corner? Do player A-10's always come from the top-left corner of the map? Is there anyway to control this? If Chinooks are buildlevel 98 and so are Wooden Fences, is there anyway to give the player the ability to built Chinooks without Fences, or is that just how it is?
    • By Rapid Spectre
      Hi,
      I've been trying to play Tiberian Dawn in DOSBox and have some questions about it. I'll start with the playlist:
      Is the game supposed to play Act on Instinct at the start of every mission? At the fourth GDI mission this seems strange. I was more expecting the game to play predetermined tracks at the start of new missions.
      Also, I think I noticed the game skipping tracks in the playlist and I saw no reason for that to be happening.

      Thanks in advance
    • By Holland
      Custom map previews are enabled again!
      This gives a great advantage to specialty maps, you can actually make it stand out so players will actually stay and try it out, and also list the required map options in the image

       
       
      Funky even made a little tool that creates the code, to put in map. A simple drag image on top of the tool and voila,
      Create custom image (256x256 pixels max) Drag image on top of CnCNetPreviewGen.exe Download   copy code of created file into your map save map, restart cncnet, pick map, click on blue WARNING button, give me your checksum+map name   Reply with checksum and map name here, or pm me whatever u want
      Then i'll whitelist it!!
      Give it to me like this example:
      5e5af5ae6491ad645de88ca03e8f636bbf78557b=TowerDefense Rally RACE! Jungle [V2]
       

      @Agrathore @A3H-Hitman @PTapioK @eliteGi @bk57 @Humble  plz let other map makers know too, can't think of them all atm, ty.
    • By uzernaem
      Hi,
      I was being nostalgic and decided to reimplement cursor graphics from the PS1 version. Note that some of the changed stuff is not a 1:1 rip from PS1 but a recreation, due to PS1 version lacking some of the sprites. Scroll icons were moved a bit for the smoother transition to the "stop sign" versions. They don't touch screen edge anymore, but still look fine.
      mouse.zip

    • By [email protected]
      I got the complete whatchawhatever from Origin and I'm trying to relive the wonderful days of my introduction to RTS, but it seems as if none of the games are functioning.
      For Tiberian Sun, clicking anything in the menu freezes the whole program.

      For C&C RA2/YR, the mouse is invisible.
      And so on.

      Is it really necessary to download third party patches for games that Origin (Electronic Assholes) are charging money for?

      You have my thanks and best wishes,
      Me
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...