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 default user
      Hi everyone,
      I know there several posts out there on Virtual Machine LAN networking, but I haven't come across any referencing VMware ESXi.  Was hoping I could start one.
      Here's what I'm trying to do...
      I have a ESXi host running vSphere 6.5.  On it are several VM guests running Windows 10 (build 1903).  All VMs are using VMNET3 virtual NICS, w/8GB RAM, and quad core vprocs.
      I'm having a heckuva time getting LAN networking to run for any CNC game (Dune 2000, TD, TS, RA - doesn't matter, symptoms are the same).
      On the VM, all games install successfully using the latest builds.  All will run without error too.  
      On the example below, I'm running Dune 2000.  As you can see in 'screenshot 1', it does not allow me to join or create a new game.  What's interesting is that the IRC client does not appear to load despite being previously installed.   The Windows firewall is turned off.
       
      Now, by contrast, on a regular laptop - the same game installer will allow me to create a new game or join an existing one.
      I welcome your thoughts.

    • By Hejjo123
      When i click full game (for windows) I then click download but, nothing happens. HELP!
    • 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...