Page 1 of 1

Two more simple things then I'll post my scenario ...

Posted: Fri Sep 10, 2010 1:49 am
by DaveyJJ
Almost done my Putot-en-Bessin scenario, the 1st in a series of battles in my Fields of Fire campaign featuring Canuck forces in Normandy from June until September of 44. The first scenario recreates the Canadians evening re-capture of Putot-en-Bessin on 8 June, 1944 from a strong German force.

That said, I have two questions I need to resolve before I can post it.

1. I am trying to display a single white text (the town's name) on screen during play ... i.e., ShowTextMarker (1, 36, 28, "IDS_LOC_PUTOT", 6, "ffffff", 1) ;. When I put it into the standard FUNCTION DrawScenarioUI() function, the game slows down horribly. How do I display place labels on screen during the whole game without it slowing down the gameplay?

2. How do I limit the Canadian artillery to a much slower cool down (reload) period. I only want the Canucks to: a) either have only 2 artillery shots; or, b) to have a reload of 10 turns before it can refire (which would accomplish the same thing).

Thanks. Hope to have this posted maybe even this evening.

P.S. Here is a teaser image showing the Canadian's starting positions.

Image

Posted: Fri Sep 10, 2010 8:51 am
by IainMcNeil
The show text marker is a command you call once to set it up and then never need to again so if you want it oon all the time call it at the start of the battle so in pre battle set up or on turn -1.

Draw UI happens every frame so you are calling a function that should be called once ever 30 times a second :)

Posted: Fri Sep 10, 2010 10:52 am
by DaveyJJ
iainmcneil wrote:The show text marker is a command you call once to set it up and then never need to again so if you want it oon all the time call it at the start of the battle so in pre battle set up or on turn -1.

Draw UI happens every frame so you are calling a function that should be called once ever 30 times a second :)
Great, I'll do that. I figured that's what was happening.

Any thought about limiting the arty?

Posted: Fri Sep 10, 2010 11:07 am
by IainMcNeil
To limit the artillery you would have to modify the cards file I think. This defines the cool down time. It would need to sit in your campaign folder, but best to ask Phil exactly where it sits. This would then overwrite the default game data when using this campaign.

Posted: Fri Sep 10, 2010 11:28 am
by adherbal
note that ShowTextMarker is used to place text (mostly VP names) on the map. If you want to add text to the info text in the top left corner (which is what the DrawScenarioUI is for) you need to use the PrintString/Int type of functions to construct a string (text).

Posted: Fri Sep 10, 2010 12:37 pm
by DaveyJJ
iainmcneil wrote:To limit the artillery you would have to modify the cards file I think. This defines the cool down time. It would need to sit in your campaign folder, but best to ask Phil exactly where it sits. This would then overwrite the default game data when using this campaign.
Phil == Pip?
adherbal wrote:note that ShowTextMarker is used to place text (mostly VP names) on the map. If you want to add text to the info text in the top left corner (which is what the DrawScenarioUI is for) you need to use the PrintString/Int type of functions to construct a string (text).
I'm using it to show the name of a location on a map, so that's why I'm using ShowTextMarker. Thanks for the DrawScenarioUI tip though!

Posted: Fri Sep 10, 2010 3:04 pm
by pipfromslitherine
You probably don't want the DrawTextMarker call in DrawScenarioUI anyway. Drop it in the StartTurn function and only call when on turn -1 or 0 and it will then sit there for the rest of the mission.

You can override the cards file by replicating and editing it in CARDS\CARDS.TXT. You can always check the positioning of a file using the folder chart in the engine docs (page 23 currently!).

Looks very cool.

Cheers

Pip

Posted: Sat Sep 11, 2010 12:24 am
by DaveyJJ
Awesome, thanks guys. Testing right now.