Requests for new components (and features)

Just register a handler for the new event and it will be created automagically. Then you can fire the event using CvEventInterface.getEventManager().fireEvent("<type>", args, ...). Check out the cool online docs for BUG's Core - Events.
yeah yeah ... but I guess my main question is how do I fire the events. There isn't a 'watcher' that tells me when these passive event status changes (is there?) so I guess I will need to code something up. My normal approach would be to compare the status last turn with the status this turn and yell when something changes. Is there a nicer method?
 
Nope, that's what you gotta do. You can look at the classes in Civ4lerts for examples on tracking information across turns. In fact, you can probably use one of the non-city-based classes to do it. Hmm, I think only the city-based alerts track across turns. :(
 
ok. I will put the tracking code in the logger so that I can log the changes (similar to AI civic swaps) and fire the events from there.
 
May I suggest putting the tracking code into SpyUtil and firing the events from there? That way Autolog can add event handlers for them along with any other mods without requiring the presence of Autolog.
 
I haven't been watching this subforum since I started using LoR. Sorry if these have been repeated ad nauseum. Suggestions:

- Straightforward option to prevent the city governor from assigning certain kinds of specialists, or to force it to assign only certain kinds when it would normally use specialists, without having to force one manually. Maybe clicking on the specialist icons would toggle a highlighted icon.

- Option to disable the declare war dialog when you move a unit into an occupied tile, and/or make No the default option rather than Yes.

- Option to prevent mouse movement from changing the selecting option in the diplomacy dialogue, preferably in all dialogues.

- Unit action that makes the unit resume the mission it was given before being stopped by a nearby enemy unit. If I had an axeman for every time I've needed to re-issue a long move order because the unit was stopped by an enemy that wouldn't have threatened its path...

- Drop-down to set the default tile view for the city raw yield list, in addition to the one for yield type. The existing drop-down is not very useful if you always switch to one of the other tile displays.

- Option to cycle to a unit for orders when it's completed a long move order and has movement points left but is grouped with slower units that don't. For example, a settler and some warriors sent to a new city location. If the settler hasn't finished moving I'll want to settle the city on that turn, rather than the when the entire grouped is selected for orders on the next turn.

- Option for workers to carry out actions individually when grouped with other units that have finished moving. Right now, if I tell two workers to build an improvement and the first worker finishes it on that turn, a command for the second worker to begin another improvement will have no effect while the units are grouped and one worker's turn will be wasted unless I select it. When I issue the second command I'd like the units to remain grouped, the second worker to begin a new improvement, and the first worker to help build on the next turn.

- A way to toggle the Avoid Growth flag for only one turn, maybe with a ctrl-click.

- Ability to alt-click a city build option in the small list dialog and the context menu, in order to repeatedly build an item without having to open the city screen.

- Option to skip prechopping when an additional order that would remove the feature is queued after the chop. If I queue chop and then cottage, I'm obviously not prechopping.
 
- Straightforward option to prevent the city governor from assigning certain kinds of specialists.

There has been some discussion on the best way to make this happen in the interface, but it's a pretty big feature. I don't think we've reached a perfect solution yet. Given the amount of work involved, I'd prefer we fleshed it out better first to avoid redoing it again and again.

- Option to disable the declare war dialog when you move a unit into an occupied tile, and/or make No the default option rather than Yes.

I've added an option to skip asking when moving onto a tile containing a rival unit (won't declare war). It still asks if you move into rival territory without open borders. Can't change the default (that's in the EXE) without reordering the buttons (not a good idea) on the popup.

- Option to prevent mouse movement from changing the selecting option in the diplomacy dialogue, preferably in all dialogues.

That would be awesome, but alas it's in the EXE. :(

- Unit action that makes the unit resume the mission it was given before being stopped by a nearby enemy unit.

Hmm, that would be pretty tough given how Civ works. You'd have to store the canceled mission queue and provide an action button to resume it. I suppose if we didn't worry about saving this queue (save game, reload, lose interrupted queues), it wouldn't be as hard.

- Drop-down to set the default tile view for the city raw yield list.

I don't know why I didn't add it when I added the other option. Done.

- Option to cycle to a unit for orders when it's completed a long move order and has movement points left but is grouped with slower units that don't.

This might get really annoying once you start moving two-MP units around with one-MP units a lot. It would be good to have a second "only for Settlers/Workers" or "only for civilian units" sub-option.

- Option for workers to carry out actions individually when grouped with other units that have finished moving.

I agree this is annoying. It mostly hits me when I tell two workers to build an improvement and a road or chop a forest before building an improvement. I'll take a look at the code, but that area of the code is cumbersome and spread across multiple functions that get called in a way I haven't fully explored.

- A way to toggle the Avoid Growth flag for only one turn, maybe with a ctrl-click.

Do you really want it for one turn only? I could see it being helpful to have it ask you how many turns, much like setting a reminder does now.

What I want are buttons next to other buttons/displays that set a reminder triggered off that action/display or better, alert when that action "does something". For example you click "remind me" next to the hurry button and it sets a reminder to whip for the turn before the population required changes.

- Ability to alt-click a city build option in the small list dialog and the context menu, in order to repeatedly build an item without having to open the city screen.

I tried to get this to work today without success. For some reason asking the EXE if the control/alt/shift keys are down doesn't work during that code. I suspect that the states of those keys are stored when the user clicks the mouse, but aren't saved inside the popup code.

Instead, I've added an option to set units queued up in the popup to build continuously. It's not great, but I think it will be correct most of the time (99% for me).

- Option to skip prechopping when an additional order that would remove the feature is queued after the chop.

This was my original intention--I just haven't gotten around to doing it. It would also allow you to easily chop a forest with the option enabled by queueing a double-chop order.

Great suggestions all around. Thanks! :goodjob:
 
Hi

I noticed how in religion menu now you not only list every city so you can tell exactly what religons are in what city but also added that button for open up the city screen which makes it VERY convenient for locating cities quickly for when you are trying to spam missionaries for shrine income, ap, or whatever cuz sometimes on a crowded map it can be a pain to hunt down those last cpl of cities that still need a missionary.

And since for same reason it can be a pain hunting down those last cpl of cities you are trying to spam corps to--is there any way to add that open up to city button on the corps screen?

Kaytie
 
Hi

I noticed how in religion menu now you not only list every city so you can tell exactly what religons are in what city but also added that button for open up the city screen which makes it VERY convenient for locating cities quickly for when you are trying to spam missionaries for shrine income, ap, or whatever cuz sometimes on a crowded map it can be a pain to hunt down those last cpl of cities that still need a missionary.

And since for same reason it can be a pain hunting down those last cpl of cities you are trying to spam corps to--is there any way to add that open up to city button on the corps screen?

Kaytie
I can look at this. Hopefully the Corp screen file is almost a straight copy of the religious screen file. Any problem with it looking similar to the BUG religious screen (with suitable changes)?
 
Hi

TYVM for taking a look :) Looks wise I dont think it would be a big deal just as long as it didnt mean losing that function where it tells you what the actual gains/costs for a corps in a city would be. To me, that's the most important function of the corps screen. Getting the zoom to city screen buttons in the same menu would be a nice little convenience but losing the yeild function just for that little conevnience probably wouldnt be worth it.

Kaytie
 
It would work just like the Religion screen does now: the last column would show the yields/commerce from the corporations in the city. In fact, I'd like to see it go further on both screens. It should have columns for the effects instead of a long string.

Religion Advisor

  • # of :)
  • :culture:
  • :hammers: % modifier
Corporation Advisor

  • :food: and :hammers:
  • :gold:, :science:, and :culture:
  • Maintenance :gold:
Since there's no switching with corporations, how about showing all the resources (with counts) used by all your corporations in a string along the bottom of the screen?
 
I can see the benefit of the 'impact' columns for corporations, but not for religions. They are always the same (+25% hammers or not).

Re resources, is it possible to get the total amount of resources visible on the map without looping over all of the plots? There are 84 fish, you have 3 - get a move on!
 
Hi

Sounds neat but dont forget one of things the corp screen does is show potential yeilds per city for each corps as well as listing each corps actually present in a city with actual yields. And that potential listing is VERY handy since it can help decide which corps if any might be worth going for. ALso not sure what you mean by no switching with corps but you actually can switch out competeing corps like say a city running mining inc can have it switched if a creative construction branch gets settled there (VERY annoying if a rival civ you have OB with starts coming in and putting their corps in your cities and thus replacing all the ones you want and have to make execs to go and switch em back) only time you CANT switch in a competing corps is if that city is the main HQ

But it still sounds very neat adding more info in a easier to read way without losing any of the old info available. Especially for someone like me who LOVES corps spam and tries to do it as much as possible :)

Kaytie
 
sounds like we have someone to do some corp screen testing and suggesting for us :D
 
Okay, I didn't know you can select (hover over?) a corporation to see what it would provide. On that screen you cannot actually spread a corporation--only see what would happen. On the Religion Advisor, you actually switch your state religion. This is what I meant. So the screen does have a similar feature (showing what if) without the CONVERT button.
 
More suggestions:

- An alert when I can change civics/religion, when the five turns has passed.
- When I give a unit a long move order, sometimes its path will change right after I give the order for no apparent reason. I'd like whatever is being taken into account when that happens to apply when I'm dragging to give the order, so the unit goes where I expect it to go. Maybe this is a job for the unofficial patch.
- A sentry command that watches for civs that I have hostile relations with but am not actually at war with. You could tie this to the war preparation flag from Better AI.

Do you really want it for one turn only?
In the early game, when I have fewer cities and don't mind the micro so much, I'll turn Avoid Growth on when a city hits the happy cap and then turn it off when I get more happiness later on. Most of the time the happy cap has only increased by one and the city has food to grow on the next turn, so I turn Avoid Growth off for one turn and then back on right after. Sometimes I forget to turn it on again, I don't notice the happy cap alert, and before I know it the city is unhappy.

Of course, what I'd really like is an option to just automatically limit growth to the happy cap and allow cities to grow as it increases. That's probably stretching the unaltered gameplay mantra a little far, but I find micromanaging city growth to be one of the most tedious aspects of the game. I'd also like sub-options to ignore happiness from temporary sources like luxuries from trade, and a cap on the number of units to take into account under Hereditary Rule.

What I want are buttons next to other buttons/displays that set a reminder triggered off that action/display or better, alert when that action "does something". For example you click "remind me" next to the hurry button and it sets a reminder to whip for the turn before the population required changes.
I've thought about this a lot. What would be nice is a way to create a reminder that takes a city or unit stack and an "advisor alert" as parameters, where the alert as an event that corresponds to an advisor. The research alert fires when a tech is researched, the espionage alert fires when a spy is at 50% preparation, etc. You could go as far as including an area on each advisor screen with checkboxes to enable various kinds of alerts related to that screen, but one catch-all alert from each advisor may be more than enough. This could be unified with the existing alerts and reminders in BUG. Think big!

For example, at the beginning of a game I have a worker with nothing to do and I'll want it to build a farm on some wheat once I've finished researching Agriculture. So, I open the research screen and make sure the Tech Researched alert is enabled (as opposed to Tech Traded For, Tech Researched by Rival, etc.). Then I select the worker and click on the new Reminder action, and a dialog pops up with one checkbox for each advisor. I check the Research box, click okay, and put the worker to sleep. Once I finish researching Agriculture and close the tech dialog, the worker is activated, the camera centers on it, and an alert popup is shown.
 
I lost a deity game the other day because I was using the victory screen to check on an AI's legendary progress. I sent a navy off to the other continent and razzed the 3'rd city about to go legendary. Unfortunately, it just happened that there was a 4'th city about to do the same! Needless too say, finally getting this vital info so late was unrecoverable.
 
@Obseolete - what are you suggesting? Putting in a 4th (and 5th?) city on that screen? I don't think we will do that as it is altered game play ... unless you can point out in the vanilla BtS game how the player can work that out.

Edit: the only way I can think of is via espionage. Maybe that is another tab on the EP screen - a listing of cities that you can see into and some general information (beakers, coin, culture, etc).
 
@Obseolete - what are you suggesting? Putting in a 4th (and 5th?) city on that screen? I don't think we will do that as it is altered game play ... unless you can point out in the vanilla BtS game how the player can work that out.

Edit: the only way I can think of is via espionage. Maybe that is another tab on the EP screen - a listing of cities that you can see into and some general information (beakers, coin, culture, etc).
There are other ways of knowing the culture level ( note, not the actual culture count ) of a city that are UG. The first one and the easiest to use is the culture overlay ( the 2nd least used overlay in the game , right after the trade groups one :D ). So, in spite of not being UG to know the actual culture count besides the 3 big cities except via espionage, it would not be non-UG to have a list of cities that have Influential ( IIRC ) culture that you have on map ( well, technically even out of the map in some cases, but let's keep it simple :D )
 
Interesting. How would you propose that we show that information?
 
Now that... *scratch head* ... that would be enough for a tab in itself :D ... between the three big culture cities and the influential ones, there is a lot of intel to display ( especially if you have espionage given intel on that ). Maybe a button opening a screen in the culture vic display, similar to the one of SS parts? Or maybe a much more simpler one: use a similar code to the one Dresden made to tag tiles where events happened and tag the cities that are Influential or Legendary? :dunno:
 
Top Bottom