Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...

Some very interesting trigger research


Nyerguds
 Share

Recommended Posts

Over at TiberiumWeb, Lin Kuei Ominae has been doing some very interesting experiments with triggers, and has come up with some neat ways to do stuff like making an AI-owned MCV move to a spot and deploy there, making reinforcements arrive on the Nod airstrip, and making a trigger to give a player money. I suggest you check it out ;)

http://www.tiberiumweb.org/forums/index.php?showtopic=3743

Mind my replies though; Lin Kuei did make a couple of mistakes :P

Link to comment
Share on other sites

  • 1 year later...

This may be interesting for mission makers: I'm debugging the trigger reading. So far I've discovered:

 

-Trigger names can indeed only be 4 characters long.

-The C&C ini read does NOT care about ";" comment signs at the start of a line. In fact, I noticed that adding comment lines starting with ; between my triggers screws up the trigger names, because the game reads from the start of the line to the next equal sign, even if that's on the next line. Then it takes the first 4 bytes of that (meaning, of the comment part on the previous line) as trigger name. I tried starting comments with ";=" but this crashed the trigger scanning code as it tried to interpret my comment as trigger.

-Teamtypes seem to have a maximum length of 12 characters, judging from the storage space reserved for the name in a teamtype object in memory. Didn't actually debug the teamtype reading, but there were 13 bytes there, and strings normally always end on a 0x00 byte.

Link to comment
Share on other sites

  • 2 years later...

Huh, looks like tiberiumweb is dead... wonder if it'll come back -_-

 

 

I should really write all of that stuff down some time. I think I still remember all of it.

-Making MCVs deploy

-Limiting the patrol path of gunboats

-C17 reinforcing tricks and giving money

 

...not sure if there was much besides that.

Link to comment
Share on other sites

Well, basically:

Making MCVs deploy:

  • Put an MCV on the map and give it the "Deploy" command
  • Make a trigger to put it in a team to move it around to the place where you want it.
  • Make this trigger fire immediately at the start of the mission, so it overrides the command of the MCV before it actually deploys.
  • After moving to the destination of the teamtype, It will deploy on the end of the route. I'm not sure if you have to give it a new Deploy command there or not, though; it's been a while. There may be some example maps on the forum here, of people who experimented with it.

This can be used for missions where you have to disrupt an enemy convoy with an MCV before it reaches its destination and starts building a base.

Restricting the route of gunboats:

  • I think this was simply making them move between two points. You have to make sure the waypoints are both exactly on its Y coordinate on the map.

C17 reinforcing and money giving:

  • You can make reinforcements arrive with C17s, but only one unit at the time
  • If you specify more units, the first will be delivered, and you will get the cash of the others as if the units were built but then cancelled
  • If you make units reinforce with C17s, but the player does not have an Airfield, the player will receive the money of the cost of the units instead.
Link to comment
Share on other sites

  • 5 months later...

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
 Share

  • Similar Content

    • By Nyerguds
      With Kamuix writing a guide on inserting maps into the N64 version, I got busy looking into how it would be possible to more-or-less automatically generate height maps of C&C maps, so inserted maps actually look good in N64.
      It took me a couple of tries, but finally I managed to create a set of tools to convert maps to height maps. All of these are contained inside the CnC64 File Converter. (v1.0.3 or higher)
       
      The basics:
      C&C terrain is not three-dimensional, but gives an illusion of 3D with the images on the cliffs. However, this illusion falls flat (literally) in a real 3D environment. To remedy this problem, they added greyscale images to the missions in N64 that indicate the elevation of the terrain (brighter = higher). So if you want to import maps into an N64 ROM and have them actually look good, they are going to need a height map too.
      Elevation is not done per cell, but on the four corners of each cell. Because of this, the height map images have a size of 65x65, whereas C&C maps are only 64x64 cells. However, the converter takes care of that automatically, so we'll just focus on making a 64x64 height map.
      The basic steps to make an image using the CnC64 File Converter:
      Open a map file, and convert it to a basic terrain levels image. This image will contain only the cliffs of the map. Save the terrain levels image and edit it in an image editor, and fill areas surrounded by cliffs with the colour for that level. If multiple levels are needed, use the brighter colors in the image's palette. There are 4 elevation levels that can be used. Open the map in the File Converter again, and generate the height map, using the terrain levels image you created. Convert the final image to 65x65 height map, and save it as paletteless N64 IMG format. The detailed steps:
       
      1. Convert a map to a basic levels image:
      Open the map you want to make a height map for. The process works best if there's a .ini file with it that tells the program which theater the map is, and how big the actual used area on the map is. The ini file itself will not be accepted by the program, so open either the .bin file, or the already-converted .map for the N64.
      Open the "Convert" menu, go to "Height map generation", and select "To basic levels image (from map)". This option will only work if you have a map loaded.

      You will end up with an image which has a dark gray background, and only the cliffs on it, in a slightly brighter gray. Note that this is a paletted image with five colours; even if the image is later saved as high-colour, it will be matched back to these five colours to be interpreted as height levels.

      As you see, the image has some modifications compared to the original; the conversion takes the last terrain types encountered at the edges of the actually used portion of the map, and stretches them to the full frame. This is done so cliffs placed outside a map's border to control reinforcements would not influence the height map.
      Note that the image is not saved yet at this point, so press Ctrl+S and save it to disk.
       
      2. Create the height levels image:
      Now the real work. Open the saved image file in your favourite image editor, and connect the cliffs to form closed areas. To do this correctly, open the map itself in a map editor so you can see the directions of the cliffs, and see what kind of elevation each area should have. Here's my process in a few steps:

      It doesn't matter if the image is saved in high colours, but as noted before, the converter will match it back to the five colours in the original image's palette, so there's no use in making detailed slopes in this. Its only function is to separate the terrain into levels.
      For the record, the grey tints used for the five levels are:
      #000000 (R=0, G=0, B=0) : Pure black. Shouldn't be used, since water creates a slight depression into terrain, and you can't do that on the lowest level. #404040 (R=64, G=64, B=64) : Basic terrain. This will be the starting level on the image, and should be seen as lowest level you can use. #808080 (R=128, G=128, B=128) : Cliffs elevation #1 #C0C0C0 (R=192, G=192, B=192) : Cliffs elevation #2 #FFFFFF (R=255, G=255, B=255) : Cliffs elevation #3. Note that this is the highest possible level, and no more terrain details can be put on top of this. Rivers should work, though, since they decrease the terrain. Anyway, with that done, we end up with our terrain levels image:

       
      3. Creating the actual (64x64) height map
      Now we got our levels image this is fairly simple. Once again, load the map into the converter program. Open the "Convert" menu, go to "Height map generation", and now select "To height map using levels (from map)".

      It will ask you to select the height levels image. Select the final product of our work from the previous step.
      Now the real magic happens. It will generate an image that adapts the terrain to the new heights, and if your cliffs match your levels image correctly, it will make sharp elevations for the cliffs and smooth slopes for the openings where the level decreases on non-cliff terrain. Furthermore, the height of rivers and other water will be applied on each specific level.

      Once this step is done, feel free to save the image if you want to add some more specific tweaks to it, or fix any errors the generator might have made. If you think the map is good enough, though, you can continue straight to the next step.
       
      4. Converting the height map to the final format
      So we got a 64x64 height map image now, loaded into the converter. The N64 game not only needs the image to be 65x65, but also needs it saved in the specific paletteless IMG format.
      First things first: go to "Convert", "Height map generation", and select the final option: "To 65x65 height map image (from image)". As you see, this is the only option in there that doesn't use a C&C map as input but an image.

      Select it, and the 64x64 data will be centered in a 65x65 frame, creating smoother edges everywhere.

      Starting from v1.04, the image in the editor will automatically identify itself as paletteless N64 image, so all you need to do is press Ctrl+S to save it in the correct format.
      ...and that's it! You have your height map, ready to insert into the ROM. The name format the game looks for is exactly the same as for the .ini and the .bin, just with .img as file extension.
    • By sgtmyers88
      EDIT: The new mod profile is live!
       
      So long time no chat. lol 😀 Since finally completing the story campaigns for Tiberian Dawn Redux a couple years ago I have been repeatedly approached about carrying the mod over into the RA universe with a spinoff. While it's still in the very early stages of development, Red Alert Redux is slowly being brought to life. I haven't decided if it will be a mini-mod type add-on built into TDR (think GDI/Nod vs. Allies/Soviets in skirmish) or a standalone project built off of the renovated C&C Generals SAGE engine TDR is now using. I know a lot of the assets and coding between the original TD and RA games is nearly the same so it would streamline development quite a bit. (looking into the original game files I noticed a lot of the art and audio assets are using the same filenames to confirm this) The biggest hurdles I have will be making a decent naval system, designing, coding, and animating attack dogs and then the Chronosphere stuff. I may also (as I did with TDR) consolidate the unit and structure tech tree and add unit upgrades and special abilities. (e.g. Engineers doubled as Mechanics and APC's doubled as Medics) So who wants Red Alert Redux? And I will say it will not be a 1:1 remake. As I did with TDR I aim to keep as much of the original wacky tech and atmosphere Westwood developed for TD and RA but also have a more realistic spin on it in both appearance and gameplay. I have been considering consulting with the former Cold War Crisis Mod Team and the guys behind Red Alert: A Path Beyond.
       
       
       



    • By Lemon_sock
      Hello,
      First time using cncnet, I keep getting kicked whenever I join a game in the lobby but don't understand why. Sometimes I get a message saying no connection or problem with connection from one of the players. Or ping will come up with my name as NA. When I join a game in the lobby there's usually no green "I'm ready" button in the bottom left, it's only there if I try host a game (but then when I click it says waiting to connect, please try again in a few seconds or something).
      Can anyone advise, or help troubleshoot? I'm guessing there's a connection issue my end but dont know how to diagnose.
      (I have managed somehow to play two online games, no idea why it worked then but not most of the time).
    • 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.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...