Building ATTILA
Moderator: Andreas the Wise
- Scott of Hyperborea
- Posts: 2816
- Joined: Wed Mar 24, 2004 5:17 pm
- Location: Ireland
- Contact:
Building ATTILA
O mighty acolytes of the Machine God:
I'm sure you've been expecting this for a while, but I would like a plausibility assessment, length of time assessment, "are you actually willing to do this" assessment, and price quote for the Attack Interpreter and Logical Analyzer (ATTILA), the core of the new QUARREL recwar model. I have two proposals for it, an Easy proposal and a Hard proposal, and I'd like you to assess both of them so I and my co-investors can decide which one we prefer.
Easy: A page where you can enter in the units involved in a QUARREL battle, and it will compute results according to something more or less like the first and second posts in this thread (but not that exactly; I'm still making changes. The system will hopefully get simpler rather than more complex). The system would tell recwarriors the outcome of a battle (for example "You lose one armor and one infantry"), log the results, and possibly handle the d20 rolls for things like spies and subs.
Hard: Like the above, but integrated with something similar to the Shireroth Bank. Every participant in the recwar registers and account and uses it to buy units. The system records how many units each person has in zir "account", and allows the person to group them into different task forces. People can then choose to battle each other, and the system will not only calculate the results, but also automatically adjust the person's units to take them into account (ie delete destroyed units from the person's force, "remember" the person's morale, etc)
Another request that applies to both systems is that they be open source and can be edited. I'm not a good programmer, but if I can read someone else's code, I can figure out what I'm doing enough to, say, change the strength of infantry from 1 to 2 if our test wars suggest that would be a better value. I'd like there to be a way to do that without me having to go to this Guild every time. Alternately, if you can write it in Python or something similarly easy, you can handle the framework and then I can fill in some of the easy mathy bits.
I recognize this is a very big order, and I'm prepared to gather investors and pay accordingly. If Small Commonwealth Currency is an insufficient motivator, I will barter anything I'm capable of making (which nowadays pretty much boils down to pretty Bryce and Photoshop graphics). If that's not enough, I'm prepared to pay real life currency as well, though probably not as much as you'd deserve.
I'm sure you've been expecting this for a while, but I would like a plausibility assessment, length of time assessment, "are you actually willing to do this" assessment, and price quote for the Attack Interpreter and Logical Analyzer (ATTILA), the core of the new QUARREL recwar model. I have two proposals for it, an Easy proposal and a Hard proposal, and I'd like you to assess both of them so I and my co-investors can decide which one we prefer.
Easy: A page where you can enter in the units involved in a QUARREL battle, and it will compute results according to something more or less like the first and second posts in this thread (but not that exactly; I'm still making changes. The system will hopefully get simpler rather than more complex). The system would tell recwarriors the outcome of a battle (for example "You lose one armor and one infantry"), log the results, and possibly handle the d20 rolls for things like spies and subs.
Hard: Like the above, but integrated with something similar to the Shireroth Bank. Every participant in the recwar registers and account and uses it to buy units. The system records how many units each person has in zir "account", and allows the person to group them into different task forces. People can then choose to battle each other, and the system will not only calculate the results, but also automatically adjust the person's units to take them into account (ie delete destroyed units from the person's force, "remember" the person's morale, etc)
Another request that applies to both systems is that they be open source and can be edited. I'm not a good programmer, but if I can read someone else's code, I can figure out what I'm doing enough to, say, change the strength of infantry from 1 to 2 if our test wars suggest that would be a better value. I'd like there to be a way to do that without me having to go to this Guild every time. Alternately, if you can write it in Python or something similarly easy, you can handle the framework and then I can fill in some of the easy mathy bits.
I recognize this is a very big order, and I'm prepared to gather investors and pay accordingly. If Small Commonwealth Currency is an insufficient motivator, I will barter anything I'm capable of making (which nowadays pretty much boils down to pretty Bryce and Photoshop graphics). If that's not enough, I'm prepared to pay real life currency as well, though probably not as much as you'd deserve.
-
- Posts: 7238
- Joined: Thu Oct 02, 2003 10:37 pm
- Location: County of Monty Crisco
- Contact:
Re: Building ATTILA
Easy and Hard are both doable. I could make an admin feature and database to keep track of unit types and stats so that you could edit them without touching the code. (the open source requirement part you asked for)
The easy one is REALLY easy, though I haven't looked at the system in those posts. I assume it's just formulas and number generators. I write those all the time.
That Hard one is basically what I've been doing with the bank, just a separate thing. I could proly write it to work with the bank. But that would bring the Small Commonwealth into things. And I doubt you want that.
As for time to make. Easy could be done on my day off. Hard would take about as much work as the Bank, and likely I don't have the time/interest to do it.
The easy one is REALLY easy, though I haven't looked at the system in those posts. I assume it's just formulas and number generators. I write those all the time.
That Hard one is basically what I've been doing with the bank, just a separate thing. I could proly write it to work with the bank. But that would bring the Small Commonwealth into things. And I doubt you want that.
As for time to make. Easy could be done on my day off. Hard would take about as much work as the Bank, and likely I don't have the time/interest to do it.
-
- Posts: 7238
- Joined: Thu Oct 02, 2003 10:37 pm
- Location: County of Monty Crisco
- Contact:
Re: Building ATTILA
I take back what I said. Easy, hurts my head. Maybe if I went and learned the system. But as it stands, I'm not inclined.
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
While using the software from the bank is fine, we wouldn't want it incorporated into the same database - its a completely separate system to any Small Commonwealth thing.
With unit stats, you'd also want a way to add in units (though if you can code in something to add units, that'll make modifying the charter further so much easier for QUARREL ...)
With unit stats, you'd also want a way to add in units (though if you can code in something to add units, that'll make modifying the charter further so much easier for QUARREL ...)
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
- Scott of Hyperborea
- Posts: 2816
- Joined: Wed Mar 24, 2004 5:17 pm
- Location: Ireland
- Contact:
Re: Building ATTILA
Andreas, let's not add a longer feature wish list when we're already having trouble convincing people to make our current one.
Erik, if you're around at 10 PM Greenwich tonight (maybe 2 PM Cali), get online and we'll include you in our nightly practice session and it'll all make sense. If that time isn't convenient for you, catch me or Harvey or Andreas online or in IRC.
Or if that doesn't work...what is the easiest possible programming language to learn that I could create an online form that calculates stuff and takes logs in?
Erik, if you're around at 10 PM Greenwich tonight (maybe 2 PM Cali), get online and we'll include you in our nightly practice session and it'll all make sense. If that time isn't convenient for you, catch me or Harvey or Andreas online or in IRC.
Or if that doesn't work...what is the easiest possible programming language to learn that I could create an online form that calculates stuff and takes logs in?
-
- Posts: 7238
- Joined: Thu Oct 02, 2003 10:37 pm
- Location: County of Monty Crisco
- Contact:
Re: Building ATTILA
PHP and HTML. Though you'll need some sort of database to store anything permanently.
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
I'm going to attempt (over the next couple months), to get the full "hard" functionality we want. To that end, I'm testing a variety of things to see if I can find the code to do what I want to do. Since you should have worked out how to do various of these things for Shirebank, I was hoping you could answer a couple questions for me, Erik (or anyone else who knows php, mysql and html well enough). (alternatively, can you give me the code for Shirebank so I can view it and work it out for myself?)
To start:
-I have a table with a set of unit statistics. I want to take a value off the table, change it (eg (value=value+2)), and then update it into the table. The code I've tried keeps coming up with errors when I use a variable in the update function. How do I do this?
-I plan to have a drop down box (or something similar to the Shirebank account select box) which enables people to select a unit. I then want a second drop down box or equivalent next to it to find which upgrades can be applied to that unit. I'd like people to be able to select multiple upgrades from the one drop down box if they wish. How can I do this (the being able to select multiple upgrades from the one box part)?
EDIT: I think I've been able to solve this second question, but I'd still love an answer to the first.
To start:
-I have a table with a set of unit statistics. I want to take a value off the table, change it (eg (value=value+2)), and then update it into the table. The code I've tried keeps coming up with errors when I use a variable in the update function. How do I do this?
-I plan to have a drop down box (or something similar to the Shirebank account select box) which enables people to select a unit. I then want a second drop down box or equivalent next to it to find which upgrades can be applied to that unit. I'd like people to be able to select multiple upgrades from the one drop down box if they wish. How can I do this (the being able to select multiple upgrades from the one box part)?
EDIT: I think I've been able to solve this second question, but I'd still love an answer to the first.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
-
- Posts: 7238
- Joined: Thu Oct 02, 2003 10:37 pm
- Location: County of Monty Crisco
- Contact:
Re: Building ATTILA
I'll try to get the bank code to you. How would you like it delivered?
Never did multiple selection. So, can't help with that.
Never did multiple selection. So, can't help with that.
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
Do you have my email? (I'm fairly sure this forum has my email publicly available) That's probably easiest. Alternatively, if you have it in a text file somewhere you can link me to it.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
A new question, for anyone with html/php knowledge.
http://www.novatainia.org/QUARREL/Database%20Engine.php
Ignore doing anything with it - I only uploaded enough of it that you can see the visual example.
What I want to do is for you to select a unit from the unit box; and then the upgrade box to change its values to only display upgrades available to that unit. I've got the database set up so that I can search upgrades by the unit they apply to etc. What I need to know is this: How (if at all) can I get the selected value from the unit box and put it into a php variable each time its changed WITHOUT the user needing to click the submit button or anything. I assume you need to use the onchange event and some sort of javascript, but I don't know how to read the value off that, nor how to then give that value to php.
http://www.novatainia.org/QUARREL/Database%20Engine.php
Ignore doing anything with it - I only uploaded enough of it that you can see the visual example.
What I want to do is for you to select a unit from the unit box; and then the upgrade box to change its values to only display upgrades available to that unit. I've got the database set up so that I can search upgrades by the unit they apply to etc. What I need to know is this: How (if at all) can I get the selected value from the unit box and put it into a php variable each time its changed WITHOUT the user needing to click the submit button or anything. I assume you need to use the onchange event and some sort of javascript, but I don't know how to read the value off that, nor how to then give that value to php.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
-
- Posts: 7238
- Joined: Thu Oct 02, 2003 10:37 pm
- Location: County of Monty Crisco
- Contact:
Re: Building ATTILA
I have no way to do it. I just have a second page. You would proly need Java script or something.
The bank is something like 20+ files... I can't just link to it.
The bank is something like 20+ files... I can't just link to it.
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
Question rephrased more explicitly.
Theoretically, I can set the Unit select box to 'onchange="update_upgrades(value, $num)" ', and it will take the name of the unit selected (value) and the number of the box ($num), and send this all to a javascript function update_upgrades, which updates the Upgrade box next to the unit box to have upgrades applicable to that unit.
However, to write the upgrade box I used php.
Essentially, what that does is it names the box "at_upgrade0", "at_upgrade1" etc; then it would select the name of the unit (it here uses the dummy variable "infantry" until I can fix this), then it finds that name in the database, and then populates the list of values to select from the upgrades applicable to that unit in the database.
Now, as far as I know, I *can't* use javascript to run php. And I don't think javascript can use mysql. If someone can find out how to solve this (either to use javascript to run php, or use javscript to run sql enquiries, or to use a different language to script (potentially VB?)), then this is the ideal and intuitive solution. But I haven't been able to find a way.
Can anybody tell me how to solve this?
Theoretically, I can set the Unit select box to 'onchange="update_upgrades(value, $num)" ', and it will take the name of the unit selected (value) and the number of the box ($num), and send this all to a javascript function update_upgrades, which updates the Upgrade box next to the unit box to have upgrades applicable to that unit.
However, to write the upgrade box I used php.
Code: Select all
$upgrade = "at_upgrade" . $num . "[]";
$upgradee = "infantry";
$upgrades = mysql_query("SELECT * FROM `upgrades` WHERE `upgrades`.`unit`='$upgradee'");
echo "<select name=" . $upgrade . " size='5' multiple >";
while($row = mysql_fetch_array($upgrades))
{echo "<option value=" . $row['upgrade'] . ">" . $row['upgrade'] . "</option>";}
echo "</select>";
Now, as far as I know, I *can't* use javascript to run php. And I don't think javascript can use mysql. If someone can find out how to solve this (either to use javascript to run php, or use javscript to run sql enquiries, or to use a different language to script (potentially VB?)), then this is the ideal and intuitive solution. But I haven't been able to find a way.
Can anybody tell me how to solve this?
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
Don't worry, solved thanks to the wonders of AJAX.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
- Ari Rahikkala
- Posts: 4326
- Joined: Sun Jan 21, 2001 12:56 pm
- Contact:
Re: Building ATTILA
Well, you seemed to be doing well enough implementing this stuff on the web yourself so I decided to just play around for a bit.
00:30 <ari> @cost 10 infantry, heavy
00:31 <lambdabot> 20
00:31 <ari> @cost 10 infantry, heavy. 2 fighters. 2 large warships, reinforced hull. 4 artillery
00:31 <lambdabot> 54
00:31 <ari> @fight "10 infantry, heavy. 2 fighters. 2 large warships, reinforced hull. 4 artillery" "6 large warships. 4 armors"
00:31 <lambdabot> 4 infantry, heavy. 2 fighter. 4 artillery
00:31 <lambdabot> 5 large warship. 4 armor
00:33 <ari> @fight "10 infantry, heavy. 2 fighters. 2 large warships, reinforced hull. 4 artillery" "6 large warships. 4 armors"
00:33 <lambdabot> 5 infantry, heavy. 2 fighter. 4 artillery
00:33 <lambdabot> 5 large warship. armor
No-one should be without a parasol, Sirocco.
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
A bizarre and obscure question, now I'm getting back into this after exams.
I'm trying to make the page where you input orbats display the cost of units as you go. Essentially, I take the standard values (unit, the number of them, and any upgrades) off the page using javascript, and send them to a php page which runs the same code as the battle simulator in order to get the cost for that unit. And, after being forced to teach myself how to error test javascript, it works ... for units and the number of them. But the Upgrades info comes from a select box where you can select multiple things - ie the value it outputs is an array. Taking that from one php page to another is easy. Taking the values from it via javascript and sending it to a php page ... not so much.
How can I take the values of an array using javscript, and send them to a php page in the URL so they can be read using $_GET?
I'm trying to make the page where you input orbats display the cost of units as you go. Essentially, I take the standard values (unit, the number of them, and any upgrades) off the page using javascript, and send them to a php page which runs the same code as the battle simulator in order to get the cost for that unit. And, after being forced to teach myself how to error test javascript, it works ... for units and the number of them. But the Upgrades info comes from a select box where you can select multiple things - ie the value it outputs is an array. Taking that from one php page to another is easy. Taking the values from it via javascript and sending it to a php page ... not so much.
How can I take the values of an array using javscript, and send them to a php page in the URL so they can be read using $_GET?
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
- Andreas the Wise
- Posts: 5253
- Joined: Sat Oct 27, 2007 10:41 pm
- Location: The Island of Melangia, Atterock, Kildare
- Contact:
Re: Building ATTILA
With a little help from Spangle, I seem to have figured this out. Thanks anyway.
The character Andreas the Wise is on indefinite leave.
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
However, this account still manages:
Cla'Udi - Count of Melangia
Manuel - CEO of VBNC. For all you'll ever need.
Vincent Waldgrave - Lord General of Gralus
Q - Director of SAMIN
Duke Mel'Kat - Air Pirate, Melangian, and Duke of the Flying Duchy of Glanurchy
And references may be made to Vur'Alm Xei'Bôn (a Nelagan Micron of undisclosed purpose).
Who is online
Users browsing this forum: No registered users and 1 guest