Topic: The Forge II - Info and feedback  (Read 56176 times)

0 Members and 1 Guest are viewing this topic.

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: The Forge (2nd run) - Info and feedback
« Reply #80 on: May 02, 2006, 02:30:19 pm »

I hear ya, just a little OTT  ;D

The update to take care of the out-of-era ships should clean up the excess opposition as well (barring screwups of course)

dave

Offline Soreyes

  • Commander
  • *
  • Posts: 3903
  • Gender: Male
  • It's Not News. It's CNN
Re: The Forge (2nd run) - Info and feedback
« Reply #81 on: May 02, 2006, 07:43:05 pm »
I figured out how to win most of the Fleet Action missions...... Just Draft Deadman in his H-MNR. It's something BIG to hide behind ;D


[img width=600 height=150]

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #82 on: May 02, 2006, 07:58:35 pm »
 :lol:

Offline Soreyes

  • Commander
  • *
  • Posts: 3903
  • Gender: Male
  • It's Not News. It's CNN
Re: The Forge (2nd run) - Info and feedback
« Reply #83 on: May 02, 2006, 09:15:14 pm »
I take it that there is no LOS rules for this server. If thats the case then why in the heck is the alliance doing LOS. If there is LOS rules then someone might want to tell the Coallition players


[img width=600 height=150]

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #84 on: May 02, 2006, 10:05:49 pm »
Correct, there are no LOS rules. I just do it by force of habit, others probably do as well... There are lots of possibilities on this map. You might want to get in on the discussions over in The Forge Allliance forum at sfc2.net to put your two cents in. (LordKrueg's organisation scares me!)  :D

Offline Soreyes

  • Commander
  • *
  • Posts: 3903
  • Gender: Male
  • It's Not News. It's CNN
Re: The Forge (2nd run) - Info and feedback
« Reply #85 on: May 02, 2006, 10:15:01 pm »
OK thanks there Bonk. Now since I know where the Klingon Home world is. It's off to Pillage and Plunder ;D


[img width=600 height=150]

Offline Riskyllama

  • D.Net Beta Tester
  • Lt.
  • *
  • Posts: 748
  • Gender: Male
  • Risky
Re: The Forge (2nd run) - Info and feedback
« Reply #86 on: May 04, 2006, 07:49:05 pm »
Hey bonk, i was looking at the webmap in IE just now (campus machine), and noticed that the hex descriptions show up correctly as oppossed to at home on firefox, why is that?
Everything is sweetened by risk. ~Alexander Smith

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #87 on: May 04, 2006, 08:22:24 pm »
Hey bonk, i was looking at the webmap in IE just now (campus machine), and noticed that the hex descriptions show up correctly as oppossed to at home on firefox, why is that?


Mozilla (Firefox) will only display a single line image "title" attribute and replace newlines with a little black box, IE will display a multi line image title attribute. And I think Firefox will not display an image "alt" attibute text as a popup at all... been a while since I looked at that, but its been something that has been bothering me for ages now.

I could use javascript to make it work properly and prettily in both browsers but I absolutely refuse to use javascript. You can blame Lepton. ;) A few years back in early versions of the webmap, stuff would not work for Lepton and a few others as they had javascript disabled. So I stripped all javascript from the webmap pages and swore off of it forever. (why I think AJAX is a load of crap as well, though it would really come in handy for that other project I'm working on... its perfect actually...). I just will not use javascript as the user can disable it and then things will not work. If something is going to work reliably in a web application it must be done serverside completely and only output dumb html.  (though SMF is pretty dependent on javascript...;)) Or one can write a client application of their own... think ACSIII ;).

http://www.w3.org/TR/html401/struct/objects.html#edef-IMG
http://www.w3.org/TR/html401/struct/global.html#title
http://www.w3.org/TR/html401/struct/objects.html#alternate-text

Mozilla (firefox) treats alternate text as exactly that, to be displayed only when the image cannot. Thus I have used the title attribute.

The webmap uses a title attribute on the image at the front of the z-index of the style attribute of the layered transparent gifs as a compromise for these considerations.

You will notice that the webmap loads slower in IE, this is because the content is sent to the browser compressed, IE does not handle this nearly as gracefully as Mozilla.

I searched the web quite a bit when working on that and settled on this compromise. Perhaps I'll eventually come up with a better solution. I still like Firefox better for the graceful handling of compressed content, the ability to render 24 bit pngs with transparency (something I removed from the webmap so IE could handle it) and overall standards compliance.

There is an interesting related discussion here:
http://extensionroom.mozdev.org/more-info/popupalt

I used the title attibute because it displays in both browsers, but mozilla cannot handle mutliline titles...

The last post on this thread describes exactly what you are observing:
http://www.webmasterworld.com/forum83/7889.htm

This one really drives me nuts, and I refuse to resort to javascript/dhtml.

Offline Riskyllama

  • D.Net Beta Tester
  • Lt.
  • *
  • Posts: 748
  • Gender: Male
  • Risky
Re: The Forge (2nd run) - Info and feedback
« Reply #88 on: May 04, 2006, 08:41:18 pm »
I also noticed for the first time that each planet has a type like core world 1 and asteroid base, etc, does this affect the mission draws at all?


Edit: If it doesn't presently, can it be made to? Would it require chaining dave in a room somewhere and writing terrain specific missions?
Everything is sweetened by risk. ~Alexander Smith

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #89 on: May 04, 2006, 09:07:56 pm »
Yes, that can affect the planet seen in missions, but as you suspect, it depends on the scripts used. I am currently only using stock planet missions... I can take a look a the source for them to see if the planet present affects things...

Also, check this out:

Long Titles   :woot:

Presto! Multi-line image title attributes will display properly! I just tested it on the webmap and the title attributes display as they do in IE with this extension loaded.  8)

This is a good solution until I can come up with a better idea. (I'll ignore the fact that most Firefox extensions are written in javascript... but it saves me adding javascript to the page...) Plus it will probably benefit viewing other sites in Firefox as well...
« Last Edit: May 04, 2006, 09:21:08 pm by Bonk »

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #90 on: May 04, 2006, 09:37:05 pm »
While we're on the subject of the webmap, you may have noticed that the shiplist purchasing column in the webyards is incomplete... this is due to a bug in the current php version. I have opened a bug report at php.net and it has been reproduced and assigned. Hopefully it will be fixed in the next version. We'll just have to put up with it till then.

http://bugs.php.net/bug.php?id=37300

That OP+4 shiplist is a pig to load into arrays in php, the script only loads the appropriate race for the character using it, but the arrays produced are still huge. It needs more than the default 8MB memory_limit in php. This is partly due to the way the fgetcsv function in php works, but it is the best(only?) solution I have found to load portions of the shiplist into arrays in memory.

Code excerpt:
Code: [Select]
<?php
$shipdatarow = array();
$shipcount 0;
$filename "shiplist.txt";
$fp=fopen("$filename","rt");
while (($shipdata fgetcsv($fp1569chr(9))) !== FALSE) {
if ($shipdata[0] == $shiprace[$WONlogonsubRace]) {
$shipdatarow[$shipcount] = $shipdata;
$shipcount++;
}
}
fclose($fp);
?>


P.S. I have yet to add the open ship bids check to the transfers page... note to self: get this done!

Offline Riskyllama

  • D.Net Beta Tester
  • Lt.
  • *
  • Posts: 748
  • Gender: Male
  • Risky
Everything is sweetened by risk. ~Alexander Smith

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #92 on: May 04, 2006, 10:23:02 pm »
Re: your question about planets affecting scripts...

If a homeworld is present you should get the Met_18HomeworldAssault.scr mission, if not you should get the Met_9PlanetaryAssault.scr.

From the mission sources:

Met_18HomeworldAssault.scr:
Code: [Select]
Specs->fMetaLocationSpec = tMetaLocationSpec( 1, kEnemyRaceHex, kHomeworldHex | kAnyTerrainHex );

Met_9PlanetaryAssault.scr
Code: [Select]
Specs->fMetaLocationSpec = tMetaLocationSpec( 1, kEnemyRaceHex | kNeutralRaceHex, kCoreworldHex | kAsteroidBaseHex| kColonyHex | kAnyTerrainHex );

Met_26AsteroidAssualt.scr
Code: [Select]
Specs->fMetaLocationSpec = tMetaLocationSpec( 1, kEnemyRaceHex | kNeutralRaceHex, kAnyTerrainHex );
(no planet/asteroid base actually required for the mission to trigger)


The following comment is present in both the planet assault mission sources, however, only the function to determine the defending race follows it...(typical... ::)):
Code: [Select]
//
// The following two functions determine the size and race of the planet and the race that should be
// defending it.
//


Other than that I don't really know enough about mission scripting to say. You'd have to ask Dave, Karnak or Tracey for a good answer...  :-\

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: The Forge (2nd run) - Info and feedback
« Reply #93 on: May 04, 2006, 11:38:11 pm »
I also noticed for the first time that each planet has a type like core world 1 and asteroid base, etc, does this affect the mission draws at all?

Edit: If it doesn't presently, can it be made to? Would it require chaining dave in a room somewhere and writing terrain specific missions?


For the stock missions, the planet/homeworld assaults just have three kinds of map: one for open space, one for asteroids, one for nebula.

The missions can be customized to give different maps based on what subtype of planet, base, and terrain are in the hex.  Actually there are a lot of combinations: 26 terrain types, 13 planet types, and 6 base types, so theoretically a mission could have 2028 different fixed maps - it's just setting them up and debugging them that's a pain.  (Most missions actually only contain between 3 and 12 maps.)

The mission scripting api recognizes the 3 types each of asteroid base hex, colony, core, and homeworld (or no planet at all),
plus 6 types each of empty space, asteroids, nebulae, and black holes,
plus 1 type each of dust clouds and shipping lanes (though these seem unreliable in practice),
plus no base or the five base types from listening post through starbase.

(OK, my usual long-winded version of a short answer!)
dave


Offline Riskyllama

  • D.Net Beta Tester
  • Lt.
  • *
  • Posts: 748
  • Gender: Male
  • Risky
Re: The Forge (2nd run) - Info and feedback
« Reply #94 on: May 05, 2006, 01:54:23 am »
I also noticed for the first time that each planet has a type like core world 1 and asteroid base, etc, does this affect the mission draws at all?

Edit: If it doesn't presently, can it be made to? Would it require chaining dave in a room somewhere and writing terrain specific missions?


For the stock missions, the planet/homeworld assaults just have three kinds of map: one for open space, one for asteroids, one for nebula.

The missions can be customized to give different maps based on what subtype of planet, base, and terrain are in the hex.  Actually there are a lot of combinations: 26 terrain types, 13 planet types, and 6 base types, so theoretically a mission could have 2028 different fixed maps - it's just setting them up and debugging them that's a pain.  (Most missions actually only contain between 3 and 12 maps.)

The mission scripting api recognizes the 3 types each of asteroid base hex, colony, core, and homeworld (or no planet at all),
plus 6 types each of empty space, asteroids, nebulae, and black holes,
plus 1 type each of dust clouds and shipping lanes (though these seem unreliable in practice),
plus no base or the five base types from listening post through starbase.

(OK, my usual long-winded version of a short answer!)
dave



that was about the length i wanted.
Everything is sweetened by risk. ~Alexander Smith

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: The Forge (2nd run) - Info and feedback
« Reply #95 on: May 05, 2006, 09:38:24 am »

Actually, adding more maps is one of those perpetual to-do things with the scripts -- it's just one of the less fun parts to actually do.

Maybe I'll finally get off my butt and see if I can get the core 10-12 missions up to 20 maps or so each...

dave

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #96 on: May 05, 2006, 09:40:28 am »
Karnak had a routine to randomly select (generate?) mission maps, it had its drawbacks but might be worth a look...

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: The Forge (2nd run) - Info and feedback
« Reply #97 on: May 05, 2006, 09:57:27 am »
yeah, you've got to be *real* careful with that to avoid generating ghost terrain though.  The random number generator in the API will generate different values for the host than others in PvP, so if you use it to generate terrain you can get some real quirky behaviour.  About the best I've been able to come up with is a pseudo-random routine based on things like the BPVs and metaIDs of all the ships in the mission, but even that gets into trouble quickly in a host-left situation. 

What's interesting is that if you generate ships randomly the information does get coordinated/corrected to match the host, but the same doesn't hold for terrain - I'm assuming that just got overlooked by Taldren.

I don't know how many folks remember clintk's patrol scripts, but he had hundreds of maps and would also produce them in different rotations.  Still miss having clint to bounce ideas off of - he had a great feel for the api.

dave
 

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: The Forge (2nd run) - Info and feedback
« Reply #98 on: May 05, 2006, 10:10:03 am »
Interesting... is it not possible to incorporate a random number generator in a script that does not depend on the API? Sort of like how DarkElf had managed a few scripts that could talk to an sql db...

Yeah, I do remember clintk. I have some of his scripts kicking around here somewhere...

Offline NuclearWessels

  • Evil Dave
  • Serverkit Development Team
  • Lt. Commander
  • *
  • Posts: 1249
  • Scripter and general nuisance
    • NukeDocs
Re: The Forge (2nd run) - Info and feedback
« Reply #99 on: May 05, 2006, 10:25:34 am »

Talking to a central server would be the ideal way to go - since then we could not only coordinate terrain information but it also opens the door for fancier interaction between the scripts and a live campaign, especially knowing what year it is!  I still can't believe there is no way in the api to know what year a mission is taking place in!

dave