PDA

View Full Version : Creative Assembly 1.2 Docudemons



Caliban
04-11-2007, 06:29
Hi Guys!

I have posted the docudemon files for 1.2 on mediashare if anyone is interested. Also posted on the TWC. http://www.mediafire.com/?8j2mzywfnzw
Heres a bit of a rip from my post there:


Good afternoon ppl!

With the leak of the recent 1.2 patch, we have decided to release the updated docudemon files for mod developers.
You can download them from mediashare here: http://www.mediafire.com/?8j2mzywfnzw

To clear a few things up, there are a few rumours about the recently available patch. It is indeed one of our builds, it was not stolen or hacked. It was sent to some file mirrors early in anticipation for the official patch release. Some sites released it early when reports from Sega came that there may be some issues. We are currently reviewing these issues and looking into claims of major bugs from the community and QA departments. There should be an official announcement about the patch in the coming days.
For those that couldn't wait and have installed the early 1.2 patch, please send any bug details to "bugs ' at' creative-assembly.com.au" along with any supporting files such as replay files, screenshots, save games etc. I'm also keeping track of the new 1.2 unofficial bug list thread.

Thanks again to everyone that has helped us track down these bugs and thanks to the moderators and admins for updating and maintaining the public bug lists.

Caliban

Casuir
04-11-2007, 07:28
Thank you

FactionHeir
04-11-2007, 12:08
Nice to hear something from you guys :)
Are you just looking at the TWC buglist or also the ORG one?

alpaca
04-11-2007, 12:09
Thanks a lot Caliban, you are all too kind :bow:

Whacker
04-11-2007, 12:42
Errmm.. Thanks, but any chance of us getting the complete documentation? I just checked and a number of commands are missing, like add_money and process_cq.

alpaca
04-11-2007, 12:46
Console commands aren't in there. The same was true for 1.1
Would be useful to have them, but maybe the new demon doesn't generate info about it.

SigniferOne
04-11-2007, 18:04
Wonderful news, thanks Caliban!

The following events were added in docudemon_events.txt:



Identifier: BattleArmyHalfDestroyed
Event: Half of an army has been destroyed
Exports: army
Class: ET_BATTLE_ARMY_HALF_DESTROYED
Author: MarkT
---------------------------------------------------
Identifier: BattlePlayerArmyHalfDestroyed
Event: Half of the player's army has been destroyed
Exports: army
Class: ET_BATTLE_PLAYER_ARMY_HALF_DESTROYED
Author: MarkT
---------------------------------------------------
Identifier: BattleEnemyArmyHalfDestroyed
Event: Half of the enemy's army has been destroyed
Exports: army
Class: ET_BATTLE_ENEMY_ARMY_HALF_DESTROYED
Author: MarkT
---------------------------------------------------
Identifier: BattleArmyTired
Event: The whole army is tired
Exports: army
Class: ET_BATTLE_ARMY_TIRED
Author: MarkT
---------------------------------------------------
Identifier: BattlePlayerUnderAttackIdle
Event: An idle unit is under missile fire
Exports: unit
Class: ET_BATTLE_PLAYER_UNDER_ATTACK_IDLE
Author: MarkT
---------------------------------------------------
Identifier: BattleWinningCombat
Event: A team has gained the advantage in combat
Exports: army
Class: ET_BATTLE_WINNING_COMBAT
Author: MarkT
---------------------------------------------------
Identifier: BattleTideofBattle
Event: A different team is now the strongest
Exports: army
Class: ET_BATTLE_TIDE_OF_BATTLE
Author: MarkT
---------------------------------------------------
[QUOTE]Identifier: InterFactionMarriage
Event: A marriage has occured between two factions. gets fired for both factions involved
Exports: faction, target_faction, target_religion
Class: ET_INTER_FACTION_MARRIAGE
Author: ScottL
---------------------------------------------------



The following conditions were added in docudemon_conditions.txt:



Identifier: HighestAttSharedChar
Trigger requirements: character_record
Parameters: attribute type, character type, logic token, level
Sample use: HighestAttSharedChar piety priest >= 5
Description: Is the highest attribute rating of any character of the same faction sharing the same tile higher than specified?
Battle or Strat: Strat
Class: HIGHEST_ATTRIBUTE_SHARED_CHARACTER
Implemented: Yes
Author: ScottL
---------------------------------------------------
Identifier: I_FactionLeaderTrait
Trigger requirements:
Parameters: faction type, trait description, logic token, level
Sample use: I_FactionLeaderTrait england BadCommander >= 2
Description: Test a factions leader traits
Battle or Strat: Either
Class: I_FACTION_LEADER_TRAIT_TEST
Implemented: Yes
Author: ScottL
---------------------------------------------------
Identifier: I_FactionLeaderAttribute
Trigger requirements:
Parameters: faction type, attribute description, logic token, level
Sample use: I_FactionLeaderAttribute england Chivalry >= 2
Description: Test a factions leader attribute
Battle or Strat: Either
Class: I_FACTION_LEADER_ATTRIBUTE_TEST
Implemented: Yes
Author: ScottL
---------------------------------------------------
Identifier: FactionAILabel
Trigger requirements: faction
Parameters: faction type, ai_label
Sample use: FactionAILabel catholic
Description: test faction ai label
Battle or Strat: Strat
Class: FACTION_AI_LABEL
Implemented: Yes
Author: ScottL
---------------------------------------------------
Identifier: I_FactionAILabel
Trigger requirements:
Parameters: faction type, ai_label
Sample use: I_FactionAILabel england catholic
Description: test faction ai label
Battle or Strat: Strat
Class: I_FACTION_AI_LABEL
Implemented: Yes
Author: ScottL
---------------------------------------------------
Identifier: NumFactionMarriages
Trigger requirements: faction, target_faction
Parameters: logic token, number of marriages
Sample use: NumFactionMarriages > 0
Description: Test the number of inter faction marriages between two factions
Battle or Strat: Either
Class: NUM_FACTION_MARRIAGES
Implemented: Yes
Author: ScottL
---------------------------------------------------
Identifier: I_UnitExists
Trigger requirements:
Parameters: Faction, Unit type
Sample use: I_UnitExists England Spear Militia
Description: Does the faction own any of these units?
Battle or Strat: Strat
Class: I_UNIT_EXISTS
Implemented: Yes
Author: Mark
---------------------------------------------------
Identifier: I_HotseatEnabled
Trigger requirements:
Parameters:
Sample use: I_HotseatEnabled
Description: Is this currently a hotseat campaign game
Battle or Strat: Either
Class: I_HOTSEAT_ENABLED
Implemented: Yes
Author: ScottL
---------------------------------------------------



The following commands was added in docudemon_commands.txt:



Identifier: set_event_counter
Parameters: event type, counter value
Description: Changes the value of an event counter.
Sample use: set_event_counter holds_cairo 0
Class: SET_EVENT_COUNTER
Implemented: Yes
Author: Mark
---------------------------------------------------
Identifier: link_faction_ai
Parameters: faction, ai_label
Description: links specified faction to specified ai label.
Sample use: link_faction_ai england catholic
Class: LINK_FACTION_AI
Implemented: Yes
Author: ScottL
---------------------------------------------------




The most potentially interesting additions have to do with new-fangled ai-labels, and "HighestAttSharedChar" (for custom scripted promotions of your own).


----------------

EDIT: I also direct your attention to this nice new condition (present since M2TW v1.0):


Identifier: I_SettlementUnderSiege
Trigger requirements:
Parameters: Settlement name
Sample use: I_SettlementUnderSiege London
Description: Is the named settlement under siege?
Battle or Strat: Strat
Class: I_SETTLEMENT_UNDER_SIEGE
Implemented: Yes
Author: ScottL

Whacker
04-14-2007, 19:39
Alpaca, my apologies for the confusion, there are some valid console commands listed in the docudemon stuff, or at least they also work in the console.

It would be very nice to get a list of console commands as well. For example, if there is a means to trigger a disaster manually, etc etc etc.

Thank you.

BozosLiveHere
04-14-2007, 22:32
Still no easy way to spread traits 'up' the family tree. Oh well.

Caliban
04-16-2007, 02:35
Sorry about the lack of console commands guys, They arn't generated in our docudemons. I'm looking at a way to get these to yas soon.

Whacker
04-17-2007, 03:15
Thanks Caliban.

I actually went into the .exe with a hex editor and ripped out what I think is the console command section. It's ugly but I parsed and cleaned up some of it. Still working on cleaning it up now.

In the interest of time and expediency, could I post this and perhaps get some comments and feedback on it? The main thing I'm curious about is a number of these commands do not work at all, meaning the engine does not recognize them as valid and the '?cmd' option does not produce any results. Are some of these perhaps disabled in the build that's shipped to us? Is there some kind of command-line option for the medieval2.exe that enables these?

Thank you and regards.

Edit - OK, here's the list. I pulled some items that didn't appear to be valid, I still have the "raw" dump in an rtf in case anyone wants it.


# MedievalShell console command listing ##


Multiple word names should be wrapped in quotes. Use '?cmdname' to retrieve help for a command.

MedievalShell command listing:

Use 'logon <password> to enable with an administrator password. Logon console currently disabled for hotseat multiplayer, no commands available.


add_money <opt:faction_type> <amount> : adds an amount of money to a faction's coffers, can be negative, default is player faction

add_population <settlement_name> <amount> : adds an amount of population to a settlement, can be negative

move_character <name> <x>,<y> : moves named character to position on campaign map

auto_win <attacker/defender>: the attacker or defender wins the next autoresolved battle

create_unit <settlement/character_name> <unit_id> <opt:how_many> <opt:exp/armour/weapon>: creates one or more units of the specified type

toggle_fow : toggles the fog of war on or off

toggle_restrictcam : toggles camera restrictions on or off

save_battle_replay : saves battle replay in file replays/<name>.rpy

give_ancillary <charactername> <ancillary name> : gives the character an ancillary

remove_ancillary <charactername> <opt:ancillary name> : removes ancillary from the character an ancillary (default = all)

give_trait <charactername> <trait name> <opt:level>: gives the character a trait at level (default = level 1)

remove_trait <charactername> <opt:trait name>: removes a specified trait from the character (default = all)

disable_vnvs: toggles whether to disable game applying traits and attributes

process_cq <settlement>: Completes all (possible) construction pending in queue

character_reset : resets the character back to it's start of turn settings

show_cursorstat : shows the cursor position and region id

toggle_terrain <opt:region/tiletype/climate/choke/landing/frontier/features/frontier_defend> : toggles the terrain to display various data sets, no param resets to normal

bestbuy : sells units cheaper

oliphaunt : the biggest around

jericho : and the walls came a-tumblin' down

write_ui_cache: writes out the ui texture cache to disk

give_trait_points <charactername> <trait name> <points>: gives the character points for trait

list_traits : lists all the available traits

list_ancillaries : lists all the available ancillaries

mp <charactername> <amount>: gives the character movement points

list_characters <opt:faction_type> : lists all the characters in the world or those belonging to a faction

show_landings <opt:cursor/region_id> : shows the landing positions available to the ai from a given region, default hides them

filter_coastlines : applies filter to world map coastlines

toggle_coastlines : toggles strategy map coastline display

set_building_health <settlement_name> <building_chain> <final health percent>: sets health of a building of the specified type (eg core_building) in a settlement, so that the final health percentage is as specified; for
building chains see export_descr_building.txt

ai_turn_speed <multiplier> : sets the maximum speed of turn processing during the ai round

amdb_min : sets aerial map overlay depth bias for min zoom

amdb_max : sets aerial map overlay depth bias for max zoom

amdb_offset : sets aerial map overlay offset towards camera

zoom : zooms to specified aerial map

set_ranking_interval : sets the denominator of the faction ranking graph interval which is calculated as (number_of_turns / denominator). If set to 0, then the denominator will be set to number_of_turns, giving an interval of 1

regenerate_radar: Does what it says on the tin

adjust_sea_bed : adjusts whole sea bed to specified height

reload_shaders : reloads all vertex shaders

reload_textures : reloads all textures

toggle_game_update

toggle_perfect_spy : toggles everyone's spying ability to perfect and infinite range, and off again

reset_display: Forces a display_close(); display_open() display reset cycle

process_rq <settlement>: Completes all (possible) recruitment pending in queue

force_diplomacy <accept/decline/off>: Forces the negotiator to accept or decline a proposition

diplomatic_stance <faction_a> <faction_b> <allied/neutral/war>: Set the diplomatic stance between the two factions

invulnerable_general <character_name> : makes that named general invulnerable in battle

test_ancillary_localisation : Toggle display of simple performance times of game update vs display perf_times

burn_piggies_burn <on/off> : ignite all the piggy winks

test_message <event_message_name | all> : Test the event message specified in descr_event_enums.txt

Test event movie: test_movie <mission_type> <movie_name> <result>

show_terrain_lines <duration> : display defensive terrain features

message_collation_set : Set the message collation on or off (sets all factions)

show_all_messages : Show all messages to all factions (on/off)

clear_messages : Clear all the current stacked messages

puppify_my_love

upgrade_settlement <settlement name> : upgrade settlement level

toggle_wireframe : Toggle wireframe rendering

reapply_rigid_model_influence

toggle_flowing_water : toggles display of campaign map flowing water
nw_stats: toggles display of network stats.
toggle_pr: toggles pr mode.

list_units <character/settlement name> : lists all of the units in an army, with details.

victory <faction> <short>: show victory message for faction for short or long campaign.

trigger_advice <thread_name> [<advice_index>] - triggers an advice thread

damage_wall <settlement> <gate> <breach>: Damage wall of settlement. Forces 40% damage to a random gatehouse and a nearby straight section. Destroys gatehouse if 'gate' parameter present; breaches wall if 'breach' present

test_victory_scroll <faction victor> <short campaign (true/false)>: Opens up the victory scroll declaring that the given faction is the victor. If no faction is declared then the 'timeout' scroll is displayed.

date <year> : changes the campaign date to the given year

season <season> : changes the campaign season to the given season

force_battle_victory <opt:capture_percent> : forces the local player's alliance to win the battle, completely destroying the enemy alliance or optionally capturing a percentage of the enemy alliance

force_battle_defeat <opt:capture_percent> : forces the local player's alliance to lose the battle, completely destroying the local alliance or optionally capturing a percentage of the local alliance

output_unit_positions <filename> : output the positions of all units in the battle to the specified file
output_unit_positions %d, %d, %d, %f, %f, %f, %f, %d
Format:- alliance_index, army_index, unit_index, formation_origin_x, formation_origin_y, rotation_in_degrees, unit_width_in_metres, unit_width_in_men

zoom_to_unit : zoom the camera to a unit of a specific id

show_battle_marker <x> <y> <t> <h>: display a marker at (x, y) for t seconds of height h

show_battle_line <x1> <y1> <x2> <y2> <t> : display a line from (x1, y1) to (x2, y2) for t seconds

show_battle_circle <x> <y> <r> <t> : display a circle at (x, y) of r radius for t seconds

kill_faction <faction_type> : removes the faction from the game

diplomacy_mission <ai_faction> <target_faction> <mission_type> <opt:mission_target> : creates a diplomacy mission

event <start_year[:end_year]> <category[:type]> [<x,y> <scale>] : creates an event

kill_character <character_name> : kills a character with the given name

control <faction_type> : switches player control to specified faction; old faction may not act correctly as ai faction

create_building <settlement_name> <building_level_id> : creates a building of the specified type in a settlement; for building level id's see export_descr_building.txt

capture_settlement <settlement name> : evicts any resident characters and armies and gives the settlement to the local player

disable_ai [opt: tac | sub | dip | name | priest]: disables all (default) or part of the ai for all factions

halt_ai <opt:factiontypename> : halts the turn sequence just before the start of the specified faction's turn, or the current faction if no faction given

run_ai [opt:x]: re-starts an ai turn sequence after disableai or haltai has been triggered; use x to also re-enable all parts of the ai which have been individually disabled

surrender_regions <opt: horde> <opt:faction_type> : gives all this faction's regions to the slaves. "horde" surrenders regions for all factions that can be hordes

toggle_chat_log : shows or hides the multiplayer chat window

bounds : toggle display of bounding objects

lights : <merge> <used> <auto>

set_option <opt_name> <opt_value> : Set new value for specified option (use 1 and 0 for boolean options)

capabilities <settlement_name> : list details of the recruitment capabilities of a settlement
capabilities * unit(%s), initial_size(%f), replen_rate(%f), max_size(%f), exp(%d),

recruitment_pool <settlement_name> : list details of the current recruitment pool of a settlement
recruitment_pool * unit(%s), available(%f)

diplomacy_costs <receiving_faction> <proposing_faction> <opt:target_faction> <opt:settlement_name> <opt:payment_amount> <opt:payment_years>: displays
a list of raw and perceived diplomacy items costs from the perspective of the receiving faction.
Demand Attack Faction: %d, (raw:%d)
Demand Cede Region: %d, (raw:%d)
Demand Yearly Payment (%d over %d years): %d, (raw:%d)
Stopping Demand Payment (%d): %d, (raw:%d)
Demand Map Information: %d, (raw:%d)
Demand Military Access: %d, (raw:%d)
DemandCardinal Vote: %d, (raw:%d)
Demand Recommunication: %d, (raw:%d)
Demand Protectorate: %d, (raw:%d)
Demand Payment (%d): %d, (raw:%d)
Declare Cancel Trade Rights: %d, (raw:%d)
Declare Cancel Military Access: %d, (raw:%d)
Declare Nullify Alliance: %d, (raw:%d)
Offer Threat of Attack: %d, (raw:%d)
Offer Attack Faction: %d, (raw:%d)
Offer Cede Region: %d, (raw:%d)
Offer Yearly payment (%d over %d years): %d, (raw:%d)
Stopping Offer payment (%d): %d, (raw:%d)
Offer Map Information: %d, (raw:%d)
Offer Military Access: %d, (raw:%d)
Offer Trade Rights: %d, (raw:%d)
Offer Ceasefire: %d, (raw:%d)
Offer Marry Leader to Princess: %d, (raw:%d)
Offer Marry Heir to Princess: %d, (raw:%d)
Offer Marry Leader: %d, (raw:%d)
Offer Marry Heir: %d, (raw:%d)
Offer Cardinal Vote: %d, (raw:%d)
Offer Recommunication: %d, (raw:%d)
Offer Alliance: %d, (raw:%d)
Offer Protectorate: %d, (raw:%d)
Offer Payment (%d): %d, (raw:%d)
Balance Owed: %d, (raw:%d)

reload_diplomacy_db: Reloads the diplomacy database.

reload_campaign_db: Reloads the campaign parameter database.

reload_sett_mech_db: Reloads the settlement mechanics database.

reload_colour_db: Reloads the UI colour database.

toggle_demeanour: Toggle whether to show the calculated demeanour values in the diplomacy scroll.

create_mission <sent_faction> <mission_id> : Attempt to create and add a mission to the specified faction

toggle_HUD_mode: switches between full and minimal HUD during a battle.

print_shortcuts: prints all the keyboard shortcuts for the current handler to documentation/current_handler_shortcuts.txt

logon <password> : enables console with an admin password

logoff: logs out administrator to disable console

clear_password <faction_label> : clears the current password for a specified faction

set_password <faction_label> <password> <password>: sets a new password for a specified faction

set_email <faction_label> <address>: sets a new email address for a specified faction

Caliban
04-17-2007, 07:20
Thanks Caliban.
I actually went into the .exe with a hex editor and ripped out what I think is the console command section. It's ugly but I parsed and cleaned up some of it. Still working on cleaning it up now.
In the interest of time and expediency, could I post this and perhaps get some comments and feedback on it? The main thing I'm curious about is a number of these commands do not work at all, meaning the engine does not recognize them as valid and the '?cmd' option does not produce any results. Are some of these perhaps disabled in the build that's shipped to us? Is there some kind of command-line option for the medieval2.exe that enables these?

Yep definatley post them if you wish. Alot of the commands are only available to us in debug mode, the retail.exe will only support a few.
I pretty much started with the same list you have there and then went through and checked which ones worked in retail mode.

This is the list I found worked with retail medieval2.exe (1.2 leak):

add_money
add_population
auto_win
bestbuy
bounds
character_reset
clear_password - hotseat only
control
create_unit
disable_ai
disable_vnvs
george
give_ancillary
give_trait
halt_ai
houston
istanbul
logoff - hotseat only
logon - hotseat only
madras
move_character
process_cq
puppify_my_love
remove_ancillary
remove_trait
rogan
run_ai
set_email - hotseat only
set_option
set_password - hotseat only
show_cursorstat
surrender_regions
toggle_fow
toggle_terrain

alpaca
04-17-2007, 09:52
Keep in mind that almost all commands are available through the console_command script command (gosh I never thought I'd be able to use the word command three times in one sentence).

FactionHeir
04-17-2007, 16:19
george
houston
istanbul
madras
puppify_my_love
rogan


So uh what do those do?

Lusted
04-17-2007, 20:53
There is only one way to find out you know, try them and see!

Whacker
04-17-2007, 21:21
Some of them don't appear to do anything, like the "bestbuy" one, at least not that I can notice.

Caliban, from that list you posted, are all of those ones that we peons can expect to work compared to the larger list I found earlier?

Also, are there any plans in the future to enable the other commands or finding some way of enabling them for our use?

Thank you.

Caliban
04-18-2007, 01:11
Those are the commands I got from our debug console. You may have discovered some I'm not aware of, might be an idea to test them.

I know what puppify_my_love does :) but not the others, sorry. I'm guessing they are left-over from RTW.

If you think there is something you guys might need in those commands, I could ask about it. I'm collecting a mod wishlist to be reviewed internally, so It might be a good idea to add it to the community wishlist thread.

Whacker
04-18-2007, 04:17
I didn't go through them all, but comparing what I scrapped together vs. the list you gave us, the list you posted seems to be roughly the only ones that work for us in our retail exe builds.

As for the modding requests, I think it's a pretty safe bet we would all like to have full access to all available console commands through the shell. Some of those would be insanely useful. The two that have come to mind recently for me at least are 1. being able to create a disaster and 2. full and absolute control over the buildings/culture/religious aspects of a city. On the latter, an example would be being able to manually take an islamic huge sized city, knock the population back down to say 500, and set the wall level to be the northern european wooden palisade, and also set the province to be 100% christian.

Something that you might want to consider in the future is also simply give us the ability to do a docudemon/command shell dump listing through a command line parameter that we feed to the exe. It'd save you the trouble of having us breaking down your doors to get this info, and just be convenient if we don't have/deleted/don't have internet access to the files you posted online.

Thank you.

Jambo
05-18-2007, 10:10
Caliban,

toggle_perfect_spy would be invaluble for modders as would diplomacy_costs

Re Berengario I
05-18-2007, 11:29
toggle_perfect_spy does work but only if launched inside a script.

Jambo
05-18-2007, 12:21
Ok, that's good to know! I take it one could do that by simply putting toggle_perfect_spy at the start of the campaign_script?

Once in, can one toggle it off from within the game? I presume not since it has to be in the script to function in the first place.

alpaca
05-18-2007, 22:21
Ok, that's good to know! I take it one could do that by simply putting toggle_perfect_spy at the start of the campaign_script?

Once in, can one toggle it off from within the game? I presume not since it has to be in the script to function in the first place.
You have to put in console_command toggle_perfect_spy
If you take the time and learn a bit of scripting, you can also find ways to switch it off again using shortcuts or buttons

Jambo
05-20-2007, 14:17
You have to put in console_command toggle_perfect_spy
If you take the time and learn a bit of scripting, you can also find ways to switch it off again using shortcuts or buttons

Thanks alpaca. Just how easy or difficult will it be to develop a script to allow toggling of perfect spy on and off? Are we talking a couple of lines of code or hours worth of work here?

alpaca
05-20-2007, 17:06
Thanks alpaca. Just how easy or difficult will it be to develop a script to allow toggling of perfect spy on and off? Are we talking a couple of lines of code or hours worth of work here?
Since we're lacking a lot of tutorials, you'll have to dig through most stuff yourself.
I'd do it by adding an advice thread, hooking it up to a show_me script and trigger on the construction scroll help request or something like that.
The old RTW tutorials about scripting should tell you how to make a show-me, but you also have to edit descr_advice_timings.txt by adding an entry so the text will actually show.
All in all it's quite a non-trivial task for starting to mod :gathering: