• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Zarine

Field Marshal
134 Badges
Feb 28, 2007
4.827
689
  • Europa Universalis IV: Res Publica
  • Gettysburg
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • For the Motherland
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler: Cold War
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sword of Islam
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • A Game of Dwarves
  • Commander: Conquest of the Americas
  • Darkest Hour
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
If you're following this Thread, new one with alpha version is out : HERE

I'm working on a project to create events using a "classic" webpage.
The final goal is to have it working with any PI game, but for now I'll focus on CK2.

The way it works is rather simple :
- Select the game
- Select the type of event
- Add the elements you want with some auto-generated field and input field
- Click a button
- Your event is correctly formatted and only wait for you to put it somewhere in the files

For now, I have created the engine to work and create the page after each action.
I still need to create the "generate" button and script behind.

And the most important part, which is the pain in the ass :
Create the list of elements to display in the combo box !
This is where I need your help : create the list of elements enabling as much options as possible.


So how does it work and what do I need :

I have 3 groups of lists :

The "what this line is for" list :
Code:
  var _ListDiv = {
    'CK2CK2' : Array('CK2'),
    'V2V2' : Array('V2'),
    'CK2CharacterEvent' : Array('Description', 'Conditions', 'Trigger', 'MeanTimeToHappen', 'MeanTimeToHappenModifier', 'Options'),
    'CK2LetterEvent' : Array('Description', 'Trigger', 'Options'),
    'CK2Decision' : Array(),
    'CK2Conditions' : Array('ConditionType'),
    'CK2NOT' : Array('Conditions'),
    'CK2OR' : Array('Conditions'),
    'CK2AND' : Array('Conditions'),
  };

The "What type of element should be here" list :
Code:
  var _ListElementName = {
    'CK2CK2' : Array('combo_Type'),
    'V2V2' : Array('combo_Type'),
    'CK2Description' : Array('input_Id', 'input_Description', 'input_Picture'),
    'CK2Conditions' : Array('add_Basic conditions'),
    'CK2Trigger' : Array('add_Add Trigger'),
    'CK2MeanTimeToHappen' : Array('combo_MTTH'),
    'CK2MeanTimeToHappenModifier' : Array('add_Modifier'),
    'CK2Options' : Array('add_Option'),
    'CK2ConditionType' : Array('combo_Condition'),
  };

The "What options are available" list :
Code:
  var _ListOption = {
    'CK2Type' : Array('Character Event', 'Letter Event', 'Decision'),
    'V2Type' : Array('Country Event', 'Province Event', 'Decision'),
    'CK2Condition' : Array('NOT', 'OR', 'AND', 'Wealth', 'Flag'),
    'CK2MTTH' : Array('Day', 'Month')
  };


The relation between each other are the following :

The "what this line is for" list contain the element to display and should match the name in the "What type of element should be here" list.
Code:
 'CK2CharacterEvent' : Array('Description',
Is linked to
Code:
'CK2Description' : Array('input_Id', 'input_Description', 'input_Picture'),

So a "character event" will display an input for Id, an input for a description and an input for a picture name.


The "What type of element should be here" list contain the element that should appear to the user. If it is a combobox element, the option of the combobox are in the "What options are available" list.
Code:
'CK2ConditionType' : Array('combo_Condition'),
Will create a combobox with the option defined in the "What options are available" list :
Code:
'CK2Condition' : Array('NOT', 'OR', 'AND', 'Wealth', 'Flag'),


The "What options are available" list is linked to the "what this line is for" list as it will add the line according to the value you set.
Code:
'CK2Condition' : Array('NOT', 'OR', 'AND', 'Wealth', 'Flag'),
You'll have a combobox with "NOT", "OR", "AND"... if you select "NOT", you'll create the line according to the "what this line is for" list
Code:
'CK2NOT' : Array('Conditions'),

As you might see, you can create loops without any problem.

In all this, there is a tricky element which is the
Code:
'CK2Conditions' : Array('add_Basic conditions'),
Those elements are in the "What type of element should be here" list. Upon clicking on the button they create, they will generate a line according to the "what this line is for" list. The element of this list must have the same name as the name of the list. Thus it's linked to
Code:
'CK2Conditions' : Array('ConditionType'),


I don't know if this was clear enough, but I need help creating those list are there are many things to do on the code and this system seems to be pretty well considering the test I made.

Here you can see what I can do for now with the list I have.
View attachment 47797

You can download the current build to see what if will look like here.
And then open with any browser with working javascript (IE might not work)
Note : it does NOT create event yet !
 
Last edited:
This is awesome, and I'm sure the final product will be golden :) I not good with these sort of things but I'm sure there is talent here on the forum so I'm going to bump this till it's finished :p
 
Current status to motivate people :

currentstatus.jpg


I would really need a list of character scope values :
Code:
'CK2CharacterCondition' : Array('NOT', 'OR', 'AND', 'input_Wealth', 'input_Flag', 'input_Stewardship', 'input_Martial', 'input_Diplomacy', 'input_Intrigue', 'input_Learning'),

To add an element, just specify the type :
"input" = for numbers and custom value (for flag or stats for instance)
"combo" = for elements inside a specify list (for culture or religion)
And none if it's to change the scope or create more elements (for instance for : "any_child = {" or AND/OR/NOT)

you put the type and the name displayed after (that's the name the user will see). You can put spaces inside without any problem, only "_" is restricted between the type and the name.
 
I'm happy to annonce that there will soon be a realease of the alpha version.
The alpha version will contain the engine (display and generation) and some options for character events only (because it's long to create the database).