Potzblitz V24.2b JAN 1st 2024

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, The Lordz

Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

You guessed quite right with your notion about that scripted attacks. I chose to do things that way because the naval AI is rubbish and I just won't reverse-engineer the whole AI system for fear of going nuts.

You can lower the chance of automated sub attacks happening by building more light cruisers and equipping them with antisub techs.
Then just place them into the Atlantic until their endurance level falls to yellow (visit ports to replenish endurance).
Re-capturing Calais and/or Antwerp will also help a lot.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
hnox
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 44
Joined: Tue Nov 27, 2018 9:57 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by hnox »

Hi.

Thanks for the answer.

Your system is elegant and it spares us the time consuming task of actually escorting those transports. Still didn't played with CP. Does it go also automatically when playing with CP?

Another question. For British blockading purposes, which area stands for the North Sea? Do fleets at the Channel fit?

And here's an idea: is it possible to have an event log file, so we can check for past events? Some games span for the whole week and its hard to keep the track of events, specially if they were played in past games. Of course we can use a piece of paper, but... :)
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

1. As singleplayer CP you'll have to conduct your own anti-convoy warfare. Entente AI will have to hunt down CP convoys with her abundant naval forces.
The scripted CP submarine warfare when playing Entente in singleplayer really is only a (some might call lazy) workaround to circumvent the bad naval AI.
I will modify that script in the next version so convoys will be relatively safe when still in the western part of the Atlantic.

2. The boundary between North Sea and Atlantic regions runs from just west of Scapa Flow to the westernmost hexes of the English Channel.

3. Agreed, an event log would be pretty neat to have. I might have another go at implementing that.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
berto
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Sat May 01, 2010 10:19 pm
Location: Oak Park, Illinois USA

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by berto »

Robotron wrote: Mon Dec 10, 2018 10:12 am You guessed quite right with your notion about that scripted attacks. I chose to do things that way because the naval AI is rubbish and I just won't reverse-engineer the whole AI system for fear of going nuts.
I'm curious. In your Lua debugging, do you ever (a) do variable dumps to log file(s) or (b) do execution tracing? I find both techniques to be quite helpful.
Campaign Series Legion, http://cslegion.com/csl/
CS Lead Coder https://www.matrixgames.com/forums/viewforum.php?f=10167
PzC & PzB Lead Coder https://wargameds.com
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

@berto: both of course but the AI code is rather messy and full of deprecated functions from earlier versions which are not commented out, adding to the confusion.

It's also clear from the many "to-do" comments, that the AI was nowhere near finished when the main coder decided to abandon the project.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
berto
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Sat May 01, 2010 10:19 pm
Location: Oak Park, Illinois USA

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by berto »

The obfuscated code doesn't help either, I am sure.
Campaign Series Legion, http://cslegion.com/csl/
CS Lead Coder https://www.matrixgames.com/forums/viewforum.php?f=10167
PzC & PzB Lead Coder https://wargameds.com
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

@berto: The encrypted AI files are one case of the mentioned leftovers from earlier versions. They are not longer used since the developers decided to release all lua scripts in plain text but it adds to the confusion.

Then there's also the non-modifiable map file for which a special editor was announced but never delivered. If you look closely you can still see leftover borders for nations that at some time during development were part of the game but then got removed (Albania, Luxembourg).
Lots of other mostly cosmetic blunders too like unit graphics being mixed up, unit movement arrows not getting displayed because of incorrect scaling etc.
To my astonishment I found rudiments of a unit experience system and a unfinished mechanic for shipment of resources both of which are now part of the mod.

When I started my mod in 2015 the player community was already starting to thin out because of the rather weak AI in singleplayer and bad unit-balancing in multiplayer, airpower was unrealistically strong with biplanes and zeppelins acting like WW2 carpet bombers. I hoped I could inject some new life into the game by ironing out the (in my view) most blatant design faults.

The biggest problems at the moment still remain the still rather deficient singleplayer AI and the crashes during turn replay in multiplayer because the engine does not a produce an error log during replay. However in the latter case I might be on the right track but understandably almost everybody (including me) is hesitant to act as multiplayer guinea pig because of the amount of time and frustration tolerance required for testing.

In defense of my additions to the game I must say that I've never done anything in lua before.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
berto
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Sat May 01, 2010 10:19 pm
Location: Oak Park, Illinois USA

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by berto »

@Robotron:

Have you considered running the Lua code through a Lua "pretty printer" (aka "beautifier")? (Of which there appear to be many available. I myself couldn't recommend any particular one.) Then distributing the reformatted code in the PB mod?

Here is a random code snippet from the CTGW game_events.lua file:

Image

I can see where there are many, many other sections of the code similarly helter skelter.

In a smaller (unmaximized) window with subsequent line wrap, the situation is even worse.

With all of the near random and excessively w-i-d-e indentation, without code blocks nicely and logically lined up, with the gratuitous extra blank lines, etc., etc. -- such code is almost impossible to follow. Applying consistent indentation, with (say) indents only four spaces each, would make the code much easier to read, understand and debug, I should think.

Just tossing a few suggestions, just trying to be helpful.
Campaign Series Legion, http://cslegion.com/csl/
CS Lead Coder https://www.matrixgames.com/forums/viewforum.php?f=10167
PzC & PzB Lead Coder https://wargameds.com
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

Of course you're quite right about keeping things neat and tidy however it never occurred to me that anybody could be bothered to look into my scripts. ^^
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
berto
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Sat May 01, 2010 10:19 pm
Location: Oak Park, Illinois USA

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by berto »

In my coding, I routinely use Emacs (my preferred code editor), the MS Visual Studio editor, and occasionally also (Cygwin/Linux) vi. With all that switching around, and with every editor having a mind and auto-format of its own, my code is a mess unless I take the trouble to fix the auto-indents and untabify routinely. Keeping things "neat and tidy" is for my later benefit, of course, when/if I need to review old code to reference or debug something.
Campaign Series Legion, http://cslegion.com/csl/
CS Lead Coder https://www.matrixgames.com/forums/viewforum.php?f=10167
PzC & PzB Lead Coder https://wargameds.com
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

I'm happy using notepad++ and my code fits properly on my monitor size and when a bug is reported by a player I can usually provide a fix within minutes since I know my own mess inside out. :)
I see where you come from but you got to cut me some slack here.
The problems I'm facing are not coming from my own additions, whatever the style, but rather from the source material, namely the AI scripts.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
berto
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 68
Joined: Sat May 01, 2010 10:19 pm
Location: Oak Park, Illinois USA

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by berto »

Granted, much or most of the code you inherited. You can't be held accountable for the prior work of others.

In any event, the proof is in the game play. In this, you have done a bang up job.

I only purchased CTGW in this season's Matrix Holiday Sale. I had been eyeing this game for several years. Good thing I only bought the game recently, because before, without PotzBlitz, I certainly would have lost interest by now. With the mod, I am happy to continue playing CTGW.

Thanks so much for PotzBlitz. Keep up the good work!
Campaign Series Legion, http://cslegion.com/csl/
CS Lead Coder https://www.matrixgames.com/forums/viewforum.php?f=10167
PzC & PzB Lead Coder https://wargameds.com
MarechalJoffre
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 96
Joined: Thu Dec 18, 2014 4:50 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by MarechalJoffre »

7.1 seems to be one of the more stable versions of the mod. No crashes encountered so far, I'm in 1916. Scrolling around the map and mouse cursor also feels a lot smoother. Latter could also be a result of updating my drivers, though.
OMGNO
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 15
Joined: Sat Aug 04, 2018 8:55 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by OMGNO »

MarechalJoffre wrote: Thu Dec 13, 2018 12:26 am 7.1 seems to be one of the more stable versions of the mod. No crashes encountered so far, I'm in 1916. Scrolling around the map and mouse cursor also feels a lot smoother. Latter could also be a result of updating my drivers, though.
I am experiencing the same. Good job Robotron!
OMGNO
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 15
Joined: Sat Aug 04, 2018 8:55 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by OMGNO »

Found a bug.

Sidenote: After capturing st. petersburg, moscow and kiev I got the event Brest-Litovsk Treaty. Russia did not surrender however and kept fighting until I took almost all their cities.
Attachments
ctgw 4.zip
(158.18 KiB) Downloaded 93 times
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

@OMGNO: in all of my years that kind of bug from that part of the scripts is the first I've ever seen. It even crashes on loading the autosave!
Have you been constantly reloading and saving during a turn?
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

@OMGNO: looks like the internal table containing the list of austrian commanders got corrupted. Still searching for the reason why that happened.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
OMGNO
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 15
Joined: Sat Aug 04, 2018 8:55 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by OMGNO »

Robotron wrote: Thu Dec 13, 2018 8:52 pm @OMGNO: in all of my years that kind of bug from that part of the scripts is the first I've ever seen. It even crashes on loading the autosave!
Have you been constantly reloading and saving during a turn?
No, I haven't. I was also quite surprised it does not even load the savegame anymore.
OMGNO
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 15
Joined: Sat Aug 04, 2018 8:55 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by OMGNO »

I think I reproduced the bug: it happens when the boehm Ermolli event is played.
Robotron
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2151
Joined: Tue Nov 23, 2010 3:35 pm

Re: POTZBLITZ V7.1 (BETA), DEC 9th

Post by Robotron »

BINGO! Well spotted! :D :D :D

I feared it was a conceptual error but thankfully it's just a simple typo causing the whole table to be reduced to a single number value.

Phew! 8)

If hope you can live without playing that event for the time being.
I'll upload V7.2 tomorrow then.
Image
Slitherine's Commander the Great War - Director's Cut: POTZBLITZ mod!
FIND IT HERE: http://www.slitherine.com/forum/viewtopic.php?f=218&t=77884&p=662610#p662610
Post Reply

Return to “Commander the Great War : Mods & Scenario Design”