Yilhan
  • Yilhan
  • 65.75% (Friendly)
  • Private Topic Starter
18 years ago
I have added 1 new building for ChinaNuke, which is OilDerrick. I replaced the new oilderrick button with button12 (command center) if im not mistaken. I've added the CommandButton code for the building (copied from militia), but when i'm playing ZH, the description of OilDerrick is missing or corrupted but i can build/sell the oil derrick without any problem. The image button also fine. Plz check out the image below. Thanks !

UserPostedImage
Sponsor
fleetatks
18 years ago
It's Because Oil Derricks aren't normally buildable so they don't have a description. If You really want it to have a description you can add one with a .csf editor.
Email me if you ever need help (edited signature November 6th, 2014)
Me Myself and Pi
18 years ago
What you could do is use the the "Generals.str" file that I just uploaded in the <> topic. It's very easy, just add:

CONTRALBAR:ConstructMilitiaOilDerreck
"TYPETEXTSTRINGHERE"
End

CONTRALBAR:ToolTipMilitiaBuildOilDerreck
"TYPETEXTSTRINGHERE"
End

to it & it will come up right in the game.
Yilhan
  • Yilhan
  • 65.75% (Friendly)
  • Private Topic Starter
18 years ago

It's Because Oil Derricks aren't normally buildable so they don't have a description. If You really want it to have a description you can add one with a .csf editor.

Just like i thought, but Militia side has the desciption for the Oil Derrick though. And hm.. i dont really know how to add one with a .csf editor, i never heard anything like that before. I search in internet and lead me nowhere, can you please give a link to where should i get started, a tutorial maybe?

What you could do is use the the "Generals.str" file that I just uploaded in the <> topic. It's very easy, just add:

CONTRALBAR:ConstructMilitiaOilDerreck
"TYPETEXTSTRINGHERE"
End

CONTRALBAR:ToolTipMilitiaBuildOilDerreck
"TYPETEXTSTRINGHERE"
End

to it & it will come up right in the game.


I've read the thread you were telling me, and downloaded the attachment file there called Generals.str. I opened the file with notepad, and there's huge list of dialogues, i dont even know where to add the code you provide above. I even google for keyword "CONTRALBAR:ConstructMilitiaOilDerreck" and there was no result. I'm a total beginner, so can you plz tell me the steps?
Me Myself and Pi
18 years ago
http://cncden.com/cncgen_utility_downloads.shtml 

You can find the "generals.csf" in the "EnglishZH.big" file in your game directory.

As for the STR file, you'll see hundreds of strings there in 3 line paragraphs. You can paste the text I posted above for it at the top, bottum, middle, anywhere as long as the paragraphs are seperated. You should paste the paragraphs to the top of it so that it'll be easy to find if you want to modify it latter.

At the top of the STR file you'll see this paragraph:

ACADEMY:AlternateMouseInterface
"One new addition is the 'Alternate Mouse Interface' option located in the Options Menu. If you are used to commanding armies using right click as your action button then this may help you get a better handle on your army."
END



All you have to do is paste the

CONTRALBAR:ConstructMilitiaOilDerreck
"TYPETEXTSTRINGHERE"
End

CONTRALBAR:ToolTipMilitiaBuildOilDerreck
"TYPETEXTSTRINGHERE"
End



right about it. So it should look like this:

CONTRALBAR:ConstructMilitiaOilDerreck
"TYPETEXTSTRINGHERE"
End

CONTRALBAR:ToolTipMilitiaBuildOilDerreck
"TYPETEXTSTRINGHERE"
End

ACADEMY:AlternateMouseInterface
"One new addition is the 'Alternate Mouse Interface' option located in the Options Menu. If you are used to commanding armies using right click as your action button then this may help you get a better handle on your army."
END



Be sure to change the TYPETEXTSTRINGHEREs to the text you want to show up in the game.
Yilhan
  • Yilhan
  • 65.75% (Friendly)
  • Private Topic Starter
18 years ago
Sorry again for the late reply, was busy with r/l thingy

thx alot Me Myself And Pi, work like a charm ;)

oh btw, how to set shortcut button to build the oilderrick?
Me Myself and Pi
18 years ago
Do you mean a button that appears on the right side of the screen? Like where the super weapon command button appear after you build them?
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
18 years ago
I think he means the shortcut "key", as in the hotkey for building something.
UserPostedImage 
CommieDog
18 years ago
You can set the hotkey for a button by editing the button name's trsing value so that the letter corresponding with the hotkey you want is proceeded with an ampersand (&). For example, the string "Oil &Derrick" will set the hotkey to 'D' on the keyboard.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Me Myself and Pi
18 years ago
Oh! That's why I've seen those 'and' symbols there! That's for that info!
Yilhan
  • Yilhan
  • 65.75% (Friendly)
  • Private Topic Starter
18 years ago
lol sorry english isnt my main languange, anyway thx krit for clearing things out.

You can set the hotkey for a button by editing the button name's trsing value so that the letter corresponding with the hotkey you want is proceeded with an ampersand (&). For example, the string "Oil &Derrick" will set the hotkey to 'D' on the keyboard.


What is the name of the file that i need to edit for building/unit's shortcut key? let say i wanna put 'D' for building the oil derrick, what files do i need to mess with?
CommieDog
18 years ago

What is the name of the file that i need to edit for building/unit's shortcut key? let say i wanna put 'D' for building the oil derrick, what files do i need to mess with?

Yilhan wrote:




http://cncden.com/cncgen_utility_downloads.shtml 

You can find the "generals.csf" in the "EnglishZH.big" file in your game directory.

Me Myself And Pi wrote:


UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Me Myself and Pi
18 years ago
That's right, use the "generals.csf". If you've been using the "Generals.str", then use that instead. Through all the "CONTROLBAR" strings, you'll see those "&" symbols in those lines. You shouldn't have any trouble creating a hot key for your oil derrek now. But try opening the world builder, an error might come saying that there's two units/structures with the same hot key. (I'm guessing all of this.) If so, go find the other hot key by typing in the "Find" program "&thehotkeyletter". If you choose "D" for your hot key, then put in the find program "&d".
Yilhan
  • Yilhan
  • 65.75% (Friendly)
  • Private Topic Starter
18 years ago
i tried the str file, open with notepad and add those strings, at 1st it didn work out, then i check the spelling and corrected it. It work fine now .. thx !!

btw it's CONTROLBAR not CONTRALBAR lol

Me Myself and Pi
18 years ago
Well, I'm glad you got it working.

But I did spell "CONTROLBAR" right. I usually run the ABC spell check at the end of typing a post. But it doesn't matter, as long as you understand it, you really don't need to worry about a mistake every now & then.