Diplomacy and Trade Logging

Here's our status:

Options:
I originally went with the 6th column, but even in English we were getting scrollbars all over:

1223108196.jpg


So as of right now, it's a single option under the Diplomacy section instead:

1223108242.jpg


The unused column is still in BugAutoLogOptionsTab.py, just commented out, and all the support functions and text are still there to provide some flexibility until we choose which way to go. As a result, the Python is a little odd right now in that it does stuff like this:
Code:
		if AutologOpt.isLogTradeAll() and AutologOpt.isLogTributeDemand():
In other words, it checks both the current single option as well as the (invisible) extra options. Since they all default to True there shouldn't be any problems unless you really try to screw things up by manually editing the INI. But, once there is a final decision on which option method to go with, the if checks should probably be streamlined.

Logging:
I arbitrarily chose Navy Blue as the official autolog trade color and here are the results of all the stuff I had saves to test. Actually, these aren't quite the same as the committed version because I went back and removed all the periods at the end of my sentences to be consistent with the existing period-less log text.
Spoiler :
======== Embargo ========
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to stop trading with Boudica (Celtia).
Diplomacy: Daveleiman (Ottomans) rejects request from Zara Yaqob (Ethiopia) to stop trading with Boudica (Celtia).
------------------------------
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to stop trading with Boudica (Celtia).
Diplomacy: Daveleiman (Ottomans) agrees to request from Zara Yaqob (Ethiopia) to stop trading with Boudica (Celtia).

======== Civics ========
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to switch to Theocracy.
Diplomacy: Daveleiman (Ottomans) rejects request from Zara Yaqob (Ethiopia) to switch to Theocracy.
----------------------------
Turn 451/750 (1861 AD) [04-Oct-2008 04:55:14]
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to switch to Theocracy.
Diplomacy: Daveleiman (Ottomans) agrees to request from Zara Yaqob (Ethiopia) to switch to Theocracy.
Research begun: Satellites (5 Turns)
A Farm was built near Oidu

After End Turn:
Istanbul grows to size 24
Fort Ironstone begins: Anti-Tank (1 turns)
Fort Ironstone finishes: Anti-Tank
Fort Cowflop finishes: SAM Infantry
Trabzon finishes: Drydock
Harappan finishes: SAM Infantry
Mugla grows to size 19
Sinop grows to size 18
Marsin grows to size 18
A Hamlet was built near Marsin
Ankara grows to size 17
Bursa finishes: University
Bodrum grows to size 17
Bodrum finishes: Harbor
Malatya finishes: Security Bureau
Target Beta grows to size 11

Other Player Actions:
Islam has spread: Jayendranagari (Khmer Empire)
Attitude Change: Suryavarman II (Khmer) towards Huayna Capac (Inca), from 'Cautious' to 'Pleased'
Civics Change: Daveleiman(Ottomans) from 'Organized Religion' to 'Theocracy'

======== Help (Tech) ========
Diplomacy: Suryavarman II (Khmer) asks Malte (England) for help (Monotheism).
Diplomacy: Malte (England) refuses request of Suryavarman II (Khmer) for help (Monotheism).
---------------------------------
Diplomacy: Suryavarman II (Khmer) asks Malte (England) for help (Monotheism).
Diplomacy: Malte (England) agrees to request of Suryavarman II (Khmer) for help (Monotheism).
Tech traded to Suryavarman II (Khmer): Monotheism

======== Religion ========
Diplomacy: Mansa Musa (Mali) asks Malte (England) to convert to Islam.
Diplomacy: Malte (England) rejects request from Mansa Musa (Mali) to convert to Islam.
------------------------------
Diplomacy: Mansa Musa (Mali) asks Malte (England) to convert to Islam.
Diplomacy: Malte (England) agrees to request from Mansa Musa (Mali) to convert to Islam.

Other Player Actions:
State Religion Change: Malte (England) from 'no State Religion' to 'Islam'
Attitude Change: Mansa Musa (Mali) towards Malte (England), from 'Cautious' to 'Pleased'
Attitude Change: Louis XIV (France) towards Malte (England), from 'Cautious' to 'Annoyed'
Attitude Change: Zara Yaqob (Ethiopia) towards Malte (England), from 'Cautious' to 'Annoyed'

======== War ========
Diplomacy: Washington (America) asks Malte (Germany) to declare war on Montezuma (Aztec).
Diplomacy: Malte (Germany) rejects request from Washington (America) to declare war on Montezuma (Aztec).
--------------------------
Diplomacy: Washington (America) asks Malte (Germany) to declare war on Montezuma (Aztec).
Diplomacy: Malte (Germany) agrees to request from Washington (America) to declare war on Montezuma (Aztec).
Malte (Germany) declares war on Montezuma (Aztec)

Other Player Actions:
Attitude Change: Pacal II (Maya) towards Malte (Germany), from 'Cautious' to 'Pleased'
Attitude Change: Montezuma (Aztec) towards Malte (Germany), from 'Cautious' to 'Annoyed'

======== Tribute (Resource) ========
Diplomacy: Montezuma (Aztec) demands Malte (Germany) give tribute (Clam).
Diplomacy: Malte (Germany) rejects demand of Montezuma (Aztec) for tribute (Clam).
--------------------------
Diplomacy: Montezuma (Aztec) demands Malte (Germany) give tribute (Clam).
Diplomacy: Malte (Germany) agrees to demand of Montezuma (Aztec) for tribute (Clam).

======== Trade Offer (OB) ========
Diplomacy: Isabella (Spain) offers to trade Open Borders to DanF_ReliTest (Portugal) for Open Borders
Diplomacy: DanF_ReliTest (Portugal) rejects trade of Open Borders to Isabella (Spain) for Open Borders
---------------------------
Diplomacy: Isabella (Spain) offers to trade Open Borders to DanF_ReliTest (Portugal) for Open Borders
Diplomacy: DanF_ReliTest (Portugal) accepts trade of Open Borders to Isabella (Spain) for Open Borders

======== Trade Offer (Res) ========
Diplomacy: Ragnar (Vikings) offers to trade Copper to SpreadCultureTesting (Ottomans) for Oil
Diplomacy: SpreadCultureTesting (Ottomans) rejects trade of Oil to Ragnar (Vikings) for Copper
------------------------------
Diplomacy: Ragnar (Vikings) offers to trade Copper to SpreadCultureTesting (Ottomans) for Oil
Diplomacy: SpreadCultureTesting (Ottomans) accepts trade of Oil to Ragnar (Vikings) for Copper

======== Deals Canceled (Gifts) ========
Turn 494/750 (1904 AD) [04-Oct-2008 06:36:47]
Diplomacy: Ragnar (Vikings) cancels gift of Gold to SpreadCultureTesting (Ottomans)
Diplomacy: Ragnar (Vikings) cancels gift of Silk to SpreadCultureTesting (Ottomans)
Diplomacy: Ragnar (Vikings) cancels gift of Banana to SpreadCultureTesting (Ottomans)
Diplomacy: Ragnar (Vikings) cancels gift of Crab to SpreadCultureTesting (Ottomans)
Diplomacy: Ragnar (Vikings) cancels gift of Rice to SpreadCultureTesting (Ottomans)

======== Deals Canceled (Trade) ========
Diplomacy: Ragnar (Vikings) cancels trade of Banana to SpreadCultureTesting (Ottomans) for Cow


And finally, DiplomacyUtil now has psuedo-event handlers for lots more diplo events. A few of them are still barebones but I can update them after some sleep. ;)
 
What about this layout?

Logging1.jpg


If the "path" and "file" boxes can (later) be unified, even better.

(the entries in the top row can be ordered and arranged differently)
 
Excellent work, Dresden! :goodjob:

On the options screen, we could drop "City " from the front of all the city-related options since the label says it already. This would help with the horizontal scrolling which is also the cause of the vertical scrolling. However, maybe doing something more radical like Cammagno suggests is a better idea.

As for the options, there are two ways to support what you have right now:

  • One option can take the value of another option. You'd place the <option> tag outside the <options> tag since it isn't stored in the INI. This is used for MoreCiv4lerts's Enabled option since it is en/disabled by the Enabled setting of Civ4lerts.

    Code:
    <option id="LogTradeAll" key="TradeAll" 
            type="boolean" default="True" 
            get="isLogTradeAll" set="setLogTradeAll"/>
    
    <option id="LogTradeOffer" [B]link="LogTradeAll"[/B]/>
  • One option can be boolean anded with another. This has the exact same effect as your Python solution.

    Code:
    <option id="LogTradeAll" key="TradeAll" 
            type="boolean" default="True" 
            get="isLogTradeAll" set="setLogTradeAll"/>
    
    <option id="LogTradeOffer" key="TradeOffer" 
            type="boolean" default="True" 
            get="isLogTradeOffer" set="setLogTradeOffer"
            [B]and="LogTradeAll"[/B]/>
The advantage is that in both cases you can strip the reference to the LogTradeAll option from your Python code. I'm not saying to do this now -- let's just choose how were going to define the options and do that. Rather, this is just for edification of some of the more advanced options stuff.
 
What about this layout?

Spoiler :
Logging1.jpg

I propose this "radical" solution because:

- 6 columns are impossible in ITA and I think also in DEU, even dropping something as EF sugested (I already dropped words for 5 columns)
- a unique option only for this category is not consistent with other categories, and furthermore it's a pity to give up the possibility to have fine customization only for a lack of space in the option screen
- the upper part of the screen is terrible and confusing as it is now... maybe mine is better, but even if it isn't, it can't be worst... ;)
- it leaves some room for future entries
 
======== Embargo ========
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to stop trading with Boudica (Celtia).
Diplomacy: Daveleiman (Ottomans) rejects request from Zara Yaqob (Ethiopia) to stop trading with Boudica (Celtia).
------------------------------
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to stop trading with Boudica (Celtia).
Diplomacy: Daveleiman (Ottomans) agrees to request from Zara Yaqob (Ethiopia) to stop trading with Boudica (Celtia).

======== Civics ========
Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to switch to Theocracy.
Diplomacy: Daveleiman (Ottomans) rejects request from Zara Yaqob (Ethiopia) to switch to Theocracy.
This is great!!! Can we squash them onto 1 line ...

Diplomacy: Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to switch to Theocracy (REJECTED).

... as the two lines are basically a duplicate and this would also fit with what happens in a standard SG. For example, you see lots of reports that have ...

"So and so can and demanded Copper - sent packing".

Or a screenie with the demand and then a "REJECTED" comment underneath.

Are you thinking of having the little headings (and the '---' lines) in there ...

======== Civics ========

Spoiler :

If you dig up the initial logger thread you will see that this is exactly what happened. eotinb posted some sample log messages and everyone threw in the 2c worth. The quality of the log from the sample to the end product went way up.
 
I agree with compressing the log messages into a single message.

  • Ruff accepts Montezuma's demand for Monotheism
  • EmperorFool rejects Victoria's request to join the war against Mansa Musa
  • Dresden accepts Ghandi's gift of Delhi
  • Cammagno refuses Stalin's request to join the trade embargo against Asoka.
 
Great work, Dresden & EF. :goodjob:
My 2 cents:
- Compressing the log messages is a good idea. Otherwise the log would be flooded with almost identical messages (offer, accept/reject).
- The 6th column should work well when the "City..." in the 2nd column is omitted.
- The proposed layout by Cam is totally weird. :crazyeye: :D
 
For anything that is a demand where the user must choose to either accept or deny with no other option, we can compress them. In that case we can simply ignore the initial demand message and only log the result of the user action. For something like a trade offer where you can renegotiate, I think we'll need both though.

The little headings were just to separate the various pieces of different logs; they'd also be less useful once log messages are condensed since each line would (usually) represent a different thing.

As for the layout discussion, I'll have to chime in there when I get back from other chores. ;)
 
What about something like ...

example 1
Diplomacy(Civics): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to switch to Theocracy. REJECTED

example 2
Diplomacy(Civics): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) to switch to Theocracy. Accepted

... although the duel colors will require a bit of a re-write of the underlying logger code.
 
For anything that is a demand where the user must choose to either accept or deny with no other option, we can compress them. In that case we can simply ignore the initial demand message and only log the result of the user action. For something like a trade offer where you can renegotiate, I think we'll need both though.

I agree, and I like the condensed versions suggested by EF.
Maybe they can be color coded differently when they are accepted offers or refused ones (as suggested by Ruff, but in the EF text form and color-coding all the line)

The little headings were just to separate the various pieces of different logs; they'd also be less useful once log messages are condensed since each line would (usually) represent a different thing.

Yes, with condensed versions they probably are no more useful...
 
Regarding the options screen, I'm in favor of a more radical redesign like Cammagno was suggesting. It sounds like 5 columns is our limit with the current 900x700 (approx) window size, so the only way to fit more options is to condense some of the stuff above. Do we have time to make that kind of change this close to a release though? (i.e. I've added options before which is pretty simple but never tried to completely rearrange a whole tab...)

Back to the log messages, I'm all for condensing the messages as it eliminates extra XML keys and streamlines the log. But because of the complexity, I want to avoid trying to get multiple colors per line to work. So here are some options that would work under the current framework:

1. Simply condense to one line.
Diplomacy (Help Request): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism; Daveleiman agrees.
Diplomacy (Help Request): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism; Daveleiman REFUSES.

2. Condense to one line; color-code accept versus refuse.
Diplomacy (Help Request): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism; Daveleiman agrees.
Diplomacy (Help Request): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism; Daveleiman REFUSES.

3. Less wordy multi-line with color-coding.
Diplomacy (Help Request): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism
Daveleiman agrees.
Diplomacy (Help Request): Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism
Daveleiman REFUSES.

4. Alternative multi-line color-coding.
Diplomacy: Help Request
Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism; Daveleiman agrees.
Diplomacy: Help Request
Zara Yaqob (Ethiopia) asks Daveleiman (Ottomans) for Monotheism; Daveleiman REFUSES.

I think I like 4 the best, but I don't much use the autolog. What do others think?
 
I like #2 the most.
 
#2 would have been my second choice, so barring any objections I think that's how we'll go for now. I'll probably keep the few trade-offer events that don't have a guaranteed accept/reject response Navy.
 
Samples of new Demand Logging:
Logging by BUG Mod 3.0 [Build 1000] (BtS 3.13-3.17)
------------------------------------------------
Turn 296/1500 (540 BC) [05-Oct-2008 01:17:03]
Diplomacy (Help Request): Suryavarman II (Khmer) asks Malte (England) for Monotheism; Malte agrees.
Tech traded to Suryavarman II (Khmer): Monotheism
Diplomacy (Religion Request): Mansa Musa (Mali) asks Malte (England) to convert to Islam; Malte agrees.

Logging by BUG Mod 3.0 [Build 1000] (BtS 3.13-3.17)
------------------------------------------------
Turn 296/1500 (540 BC) [05-Oct-2008 01:18:32]
Diplomacy (Help Request): Suryavarman II (Khmer) asks Malte (England) for Monotheism; Malte REFUSES.
Diplomacy (Religion Request): Mansa Musa (Mali) asks Malte (England) to convert to Islam; Malte REFUSES.

Logging by BUG Mod 3.0 [Build 1000] (BtS 3.13-3.17)
------------------------------------------------
Turn 330/1500 (200 BC) [05-Oct-2008 01:20:02]
Diplomacy (Tribute Demand): Montezuma (Aztec) demands that Malte (Germany) give Clam; Malte REFUSES.
Diplomacy (War Request): Washington (America) asks Malte (Germany) to declare war on Montezuma (Aztec); Malte agrees.
Malte (Germany) declares war on Montezuma (Aztec)

Offer Logging still needs more than one line because of the possibility of not getting a definitive answer. In the third situation below, I renegotiated and we agreed to a different deal that isn't easily captured. Future work on this component will probably focus on trying to get these more complex deals at least partially logged.

Logging by BUG Mod 3.0 [Build 1000] (BtS 3.13-3.17)
------------------------------------------------
Turn 9/315 (1340 AD) [05-Oct-2008 01:22:19]

After End Turn:
Lisbon grows to size 8
Lisbon finishes: Theatre
Lisbon begins: Library (4 turns)

Turn 10/315 (1350 AD) [05-Oct-2008 01:22:25]
Diplomacy: Isabella (Spain) offers to trade Open Borders to DanF_ReliTest (Portugal) for Open Borders
Diplomacy: DanF_ReliTest (Portugal) accepts trade of Open Borders to Isabella (Spain) for Open Borders

Logging by BUG Mod 3.0 [Build 1000] (BtS 3.13-3.17)
------------------------------------------------
Turn 9/315 (1340 AD) [05-Oct-2008 01:22:45]

After End Turn:
Lisbon grows to size 8
Lisbon finishes: Theatre
Lisbon begins: Library (4 turns)

Turn 10/315 (1350 AD) [05-Oct-2008 01:22:48]
Diplomacy: Isabella (Spain) offers to trade Open Borders to DanF_ReliTest (Portugal) for Open Borders
Diplomacy: DanF_ReliTest (Portugal) rejects trade of Open Borders to Isabella (Spain) for Open Borders

Logging by BUG Mod 3.0 [Build 1000] (BtS 3.13-3.17)
------------------------------------------------
Turn 9/315 (1340 AD) [05-Oct-2008 01:23:02]

After End Turn:
Lisbon grows to size 8
Lisbon finishes: Theatre
Lisbon begins: Library (4 turns)

Turn 10/315 (1350 AD) [05-Oct-2008 01:23:06]
Diplomacy: Isabella (Spain) offers to trade Open Borders to DanF_ReliTest (Portugal) for Open Borders
 
What about this layout?

[...]

If the "path" and "file" boxes can (later) be unified, even better.

(the entries in the top row can be ordered and arranged differently)

Man, I was way too optimistic on the sixth column. It works with English but not with all other languages.
How about organizing the logging options into rows instead of columns? Is a comboBox able to handle more than 2 entries?
 
How about organizing the logging options into rows instead of columns? Is a comboBox able to handle more than 2 entries?

I think organizing by rows would make it look more jumbled. And a combobox is another word for a dropdown list box where you select 1 option out of many choices like all the dropdowns that exist already. If that's what you're talking about, then no -- only one selected item at a time.
 
I think organizing by rows would make it look more jumbled. And a combobox is another word for a dropdown list box where you select 1 option out of many choices like all the dropdowns that exist already. If that's what you're talking about, then no -- only one selected item at a time.

I was thinking about something like this:



There is a scroll bar but I think that a vertical scroll bar is way better than a horizontal one. :D
 
there is something wrong with that scroll bar on TheDoc's pic. Just spent the last 5 minutes trying to get it to scroll.
Spoiler :
Do you find yourself doing this when looking at a picture of a Civ IV game? Like moving the curser over enemy units and then looking at the hover pane (bottom left) for unit information?
 
There is a scroll bar but I think that a vertical scroll bar is way better than a horizontal one. :D

It's not what I envisioned with your proposal, and I like it a lot. It also will make adding/removing items easier as you no longer have to try to keep the same number in each section.

What do you think about lining up the items into columns within each section -- ignoring other sections -- when there are multiple rows in a single section? I might even be tempted to line up all items across sections (4 columns in addition to the section labels), but that might imply meaning where there is none and make it difficult in other languages.

Do you find yourself doing this when looking at a picture of a Civ IV game? Like moving the curser over enemy units and then looking at the hover pane (bottom left) for unit information?

Sadly, yes. I do the hover-over-a-unit-or-icon thing a lot. I can't count the times I got frustrated that a new feature I had added to BUG had broken something unrelated. :blush:
 
It's not what I envisioned with your proposal, and I like it a lot. It also will make adding/removing items easier as you no longer have to try to keep the same number in each section.

What do you think about lining up the items into columns within each section -- ignoring other sections -- when there are multiple rows in a single section? I might even be tempted to line up all items across sections (4 columns in addition to the section labels), but that might imply meaning where there is none and make it difficult in other languages.

[...]

Layout with 4 columns over all items:



I did this one first because it was easier. Next, I'll try the one you suggested. :D

Edit: Here's EF's suggestion with 4 columns:



Doesn't look pretty at first glance. I'll try a 5 column layout and see if it gets better.
 
Back
Top Bottom