Opened 12 years ago

Last modified 3 years ago

#1404 new enhancement

Add starting phase and max phase to map files and Atlas

Reported by: Erik Johansson Owned by:
Priority: Should Have Milestone: Backlog
Component: Atlas editor Keywords: gui, simple
Cc: Patch:

Description

It should be possible to specify starting phase for each player in the map file. This should be implemented so that it's possible to set starting phase for each player separately in Atlas as well (just as well to implement that ability as well at the same time the map file support is implemented). Since it's so closely related a way to set a "highest reachable phase" should probably be implemented at the same time.

Attachments (3)

output2.diff (4.2 KB ) - added by Idanwin 10 years ago.
crude s/d tech solution
tech.diff (4.5 KB ) - added by mimo 9 years ago.
tech-v2.diff (6.9 KB ) - added by mimo 9 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 by historic_bruno, 12 years ago

Keywords: simple gui added

comment:2 by Kieran P, 12 years ago

Milestone: Alpha 11Backlog

comment:3 by zoot, 11 years ago

"Phase" is very data-dependent. How about instead doing "starting techs" and "unallowed/unavailable techs"? To set Town Phase as starting phase, you would simply set the "Town Phase" tech as a starting tech (i.e. researched from the outset of the game). To set Town Phase as max phase, you would set the "City Phase" tech as unallowed/unavailable.

comment:4 by Azad Naik, 10 years ago

Owner: set to Azad Naik
Status: newassigned

comment:5 by Stan, 10 years ago

Component: UI & SimulationAtlas editor

comment:6 by historic_bruno, 10 years ago

Owner: Azad Naik removed
Status: assignednew

Unassigning due to lack of progress.

comment:7 by Idanwin, 10 years ago

Owner: set to Idanwin
Status: newassigned

by Idanwin, 10 years ago

Attachment: output2.diff added

crude s/d tech solution

comment:8 by Stan, 10 years ago

Keywords: review added

comment:9 by leper, 10 years ago

Keywords: review removed

Code should follow the coding conventions, should have a check for cmpTechnologyManager in Player.js. The patch is also missing a way to add those starting/disabled techs, and doesn't have an example either.

comment:10 by Stan, 9 years ago

Owner: Idanwin removed
Status: assignednew

comment:11 by mimo, 9 years ago

I've attached a new version of the patch, using the same logic as for initialisation of garrisoned units (see #2984). Maps can have starting techs and disabled techs, possibly different for each player. In the patch, the changes in the map xml files are only for test purposes, and as example of how this patch works.

by mimo, 9 years ago

Attachment: tech.diff added

comment:12 by mimo, 9 years ago

Keywords: patch review added

by mimo, 9 years ago

Attachment: tech-v2.diff added

comment:13 by mimo, 9 years ago

To ease the interface with Atlas, the info is now directly read from the map settings (although the scripted approach still works). Look at the demo change in Alpine_Valleys_(2).xml to see how it is done: in this example, player 1 start at town phase, can neither research city phase nor build temple, and starts with 4 units garrisoned in its cc.

comment:14 by mimo, 9 years ago

In 16270:

read starting tech, disabled tech, ... from map JSON file, refs #1404

comment:15 by mimo, 9 years ago

Milestone: BacklogAlpha 19

r16270 implements the readings of the new JSON properties (StartingTechnologies, DisabledTechnologies, DisabledTemplates (in PlayerData) and Garrison. The simulation can now use this info if present in the map. The interface with Atlas to write these properties will be done after A18 is released..

comment:16 by leper, 9 years ago

Keywords: patch review removed

comment:17 by leper, 9 years ago

In 16444:

Use arrays for specifying StartingTechnologies, DisabledTechnologies, and DisabledTemplates.

Also add an example for StartingTechnologies to the Carthagian sandbox map. Refs #1404.

comment:18 by Itms, 9 years ago

Milestone: Alpha 19Backlog

Backlogging due to lack of progress for the original request.

comment:19 by Silier, 3 years ago

Keywords: simple removed
severity: simple

comment:20 by Silier, 3 years ago

Keywords: simple added
Note: See TracTickets for help on using tickets.