Jump to content


Photo

Modding tips


  • Please log in to reply
2 replies to this topic

#1 ReKoil

ReKoil

    C&C Renegade Corn Supplier

  • Senior Moderators
  • 909 posts
  • Steam:
    rekoil637
  • Location:
    Hoorn, Netherlands

Posted 18 August 2010 - 08:21 AM

After copying all tutorials from renz0r that I could find, and updating the list of scripts with two new ones I came across, there were still some things I had found that werent covered. So I thought I'd make a new thread for modding tips.

Tip 1: The Singleplayer HON model.
If you've downloaded this one: http://planetcnc.gam...e.Detail&id=85I , and you want to use it on your map, then take this tip into account:

When you have merged the model into RenX, ungroup it and select all the boxes that are placed inside/slightly underneath the HON. You'll recognise them easily. I'm not sure if the boxes were a seperate group on themselves, but if so, ungroup them. You cant edit w3d settings when they are grouped.
When they've been ungrouped go to the hammer tool, then to w3d setting and click hide. If you don’t do this, they will show up as white boxes ingame, which isnt a disaster, but just look ugly.


Tip 2: Turrets.

I just fixed an rather amusing bug, which was caused by me being lazy.
Here's what happened:
I wanted to hurry up placing multiple turrets by copying them. After doing this and testing it ingame, I noticed you could push the turrets around with vehicles! Offcourse I was actually lmao at first. But after various failed attempts to fix it I got annoyed. It ended Up taking 1 and a half hour before I came to a 'if this doesnt work, then I dont know what does' solution.
I deleted all copied turrets, and replaced them one by one (and adding the scripts one by one again), tested it and suddenly they couldnt be pushed anymore
So: never ever copy turrets!


Tip 3: Listenerscale

A important question right now: The bots right now (if spawned and its a bot that is allowed to move) ALL come running towards their fellow bots as soon as these bots spot me and open fire (or if I open fire on them). It doesnt matter how far away they are. They could be on the other end of the map, with mountains between us, and still walk towards me. So: is there a way to disable this? I'm thinking that unchecking the 'AllowInnateConversation' box might fix this, but i'm not sure. Perhaps it's an sight range or sight arc problem? What are correct settings for these so that this situation doesnt happen? (sight arc is on the default 135.000 for all bots).

Solution: set listenerscale to 0.000


Tip 4: Pathfind generators

A problem I had:
Bots in the first area would move and act normal. Bots in the second, third and fourth area would not. Stationary ones would work, but moving ones wouldnt.

After some attempts I did manage to solve this. Quite easily actually.

Tip: to solve this I placed multiple pathfind> human thingies on the map. There already was one in the first area, which is why bots there would work. I thought that would work for the entire map, but it didnt. So: I placed one of those pathfind>human thingies per area, and then ran the pathfind generator again. problem solved :D This problem is probably caused because not everything was attached to each other in Renx (because I wanted multiple textures).


Post any modding tips you have or know of in this thread, if you want :)
Soldier in the war on bots.
-------------------------------------------------------------------

#2 ReKoil

ReKoil

    C&C Renegade Corn Supplier

  • Senior Moderators
  • 909 posts
  • Steam:
    rekoil637
  • Location:
    Hoorn, Netherlands

Posted 19 August 2010 - 03:24 PM

Tip 5: If you want to make an bot (char or vehicle) or structure invincible, the easiest thing to do is to go to the preset of that which you want invincible and select Blamo as a skin for the health.
Soldier in the war on bots.
-------------------------------------------------------------------

#3 ReKoil

ReKoil

    C&C Renegade Corn Supplier

  • Senior Moderators
  • 909 posts
  • Steam:
    rekoil637
  • Location:
    Hoorn, Netherlands

Posted 05 October 2014 - 04:33 PM

Tip 6: If you want to make a switch (or some other game object, but I am using the switch in this example) to be pokeable only once every x amount of seconds:

Place the switch on the map and double click it. Go to scripts. Attach the following scripts:

-First off: JFW_Poke_Send_Custom_2. Paramaters:
Player type = 0 (NOD) or 1 (GDI).
ID = fill in the ID of the switch you are attaching these scripts to here. This means it will send the custom to itsself.
Message = fill in whatever you like. Minimum amount of digits for custom messages is 1, max of 6 (so anywhere from 0 to 999999). I prefer to work with units of 1000, starting at 1000.
Param = 1.
So for example on one of my switches on canyon it looks like this: 0, 100373, 1000, 1.

-Next: JFW_Remove_Script_Custom. Paramaters:
Script = JFW_Poke_Send_Custom_2.
Message = same message as the one on the poke script.
Which for example looks like: JFW_Poke_Send_Custom_2, 1000

-Next: The timer script: JFW_Timer_Custom_On_Off. Paramaters:
Time: x amount of seconds. Use whatever amount of time you want. I used 20 seconds on my message switches.
TimerNum: Any unique number. Minimum of 3 digits, max of 6 digits if I recall correct.
Repeat: 0 or 1. 0 is script does not repeat itsself over and over after timer expires, 1 is script does repeat itsself. Put 0.
ID: Again, put the switch ID your putting these scripts on here.
Message = Any custom message; the timer sends the custom (to the ID) AFTER it expires. I put 1500 here.
Param = 1.
EnableMessage = same message as the poke script = 1000 in my case.
DisableMessage = 0.
Which for example looks like: 20.00, 1002, 0, 100373, 1500, 1, 1000, 0

-Next: JFW_Attach_Script_Custom. Paramaters:
Script: JFW_Poke_Send_Custom_2
Params: These are the paramters of the script you are attaching, in this case the poke script. Just repeat the paramaters as you have them in the poke script. Each paramater seperated by a letter. For example: 0g100373g1000g1 (scroll back up to the poke script if you do not understand these numbers).
Delim: Put the letter you used to seperate the paramaters here. In this case: 'g'.
Message = the same message the timer script sends after expiring. In this case 1500.
So in my case all this leads to: JFW_Poke_Send_Custom_2, 0g100373g1000g1, g, 1500

So what we have done is use a poke script to send a custom to remove itsself and at the same time start a timer, which makes the switch unpokeable for however long the timer runs. Then when timer expires it re-attaches the poke script enabling it to be poked again.

And voila, you now have a switch which can only be poked once every x amunt of seconds. Next attach whatever script you want to be executed by the poke. if it is only 1 or a few script you are better off attaching it to the switch itsself as well. Make sure you use the same message as whatever you used on the poke script to trigger the script if you do (1000 in my case).

If however, like me, you are using this for message switches and you have a lot of messages to disply as once, send to a daves arrow first and then put the display message scripts on that arrow. The reason for this is that there is a limit of 10 scripts on a single object. And since the setup for poking only once every x amount of seconds already hogs 4 script spaces already (5 if you put the Pokeable item script on the object rather than the preset), using a daves arrow is reccommended in this case. If you do this use JFW_Custom_Send_Custom. Paramaters:
ReceiveMessage = Same message the switch sends on poke.
SendMessage = Same custom message you need to put on whatever scripts you put on the arrow.
SendParam = 1.
SendID = ID of the arrow.
So in my case: 1000, 2000, 1, 100393.
So then on the daves arrow on my message scripts i put the custom of 2000.

Example pic below outside the quote.


Example Pic:

Attached File  1pokeperxseconds2.png   441.86KB   4 downloads

Also, attach the JFW_Pokeable_Item script to either the preset of the switch or the switch itsself to get the arrow thingy to show up ingame when you aim at it.
Soldier in the war on bots.
-------------------------------------------------------------------




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users