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 :
The "What type of element should be here" list :
The "What options are available" list :
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.
Is linked to
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.
Will create a combobox with the option defined in the "What options are available" list :
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.
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
As you might see, you can create loops without any problem.
In all this, there is a tricky element which is the
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
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 !
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',
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'),
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'),
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'),
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: