Topic: FYI: work in progress: OP+ 4.1  (Read 114616 times)

0 Members and 1 Guest are viewing this topic.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: FYI: work in progress: OP+ 4.1
« Reply #80 on: October 09, 2010, 08:45:47 pm »
As far as I know Javascript/Actionscript's regexp implementation is no different than perl's. If the expression works in perl and then it should work in js and vice versa. (ditto for php...) A regexp is a regexp is a regexp is it not? (don't want to get too far off track here though)

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #81 on: October 09, 2010, 08:55:10 pm »
Maybe I got confused by your saying that $$ was confusing you. (To me, it's either a special variable in perl and bash: the current process's PID.. or a $ at the end of the line in regexp).
Truth is, there are 2 'levels' of regular expressions that I know. Perl and sed use Extended regexp.

From 'man grep':
Code: [Select]
   Basic vs Extended Regular Expressions
       In basic regular expressions the meta-characters ?, +, {,  |,  (,  and  )  lose  their
       special meaning; instead use the backslashed versions \?, \+, \{, \|, \(, and \).

       Traditional egrep did not support the { meta-character, and some egrep implementations
       support \{ instead, so portable scripts should avoid { in grep -E patterns and  should
       use [{] to match a literal {.

       GNU grep -E attempts to support traditional usage by assuming that { is not special if
       it would be the start of an invalid interval specification.  For example, the  command
       grep -E '{1'  searches  for  the two-character string {1 instead of reporting a syntax
       error in the regular expression.  POSIX.2 allows this behavior as  an  extension,  but
       portable scripts should avoid it.

As far as I know Javascript/Actionscript's regexp implementation is no different than perl's. If the expression works in perl and then it should work in js and vice versa. (ditto for php...) A regexp is a regexp is a regexp is it not? (don't want to get too far off track here though)


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: FYI: work in progress: OP+ 4.1
« Reply #82 on: October 09, 2010, 09:40:07 pm »
Maybe I got confused by your saying that $$ was confusing you. (To me, it's either a special variable in perl and bash: the current process's PID.. or a $ at the end of the line in regexp).

See? Even more reasons it was a bizarre choice! (I wonder which predates which?) As the character is everywhere. Tags should be chosen for reasonable uniqueness, ease of parsing and ease of remembering. Arg. I would love to know what the original latex people were thinking... Double dollar signs, ok, but along with single dollar sign tags too? A recipe for disaster.

The problem as you might imagine went something like this:
Quote
"Lor$em ipsum dolor sit amet, consectetur adipisicing elit, sed $4.95 do eiusm$$od te$$mpor incididunt $$ut$$ labo$re$ et dolore ma$$gna$$ aliqua. Ut enim ad minim veniam, $quis$ nostrud exe$rcitati$on ullamco$ laboris $nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit $14.95 on sale in vo$$lupta$$te velit $esse$ cillum dolore eu f$ugi$at nulla pariatur. Excepteur sint occaecat cupidatat non proide$$nt, s$$unt in culpa qui officia deserunt mollit $$anim$$ id est laborum."

How the hell are you supposed to tell what is inside what tag? And which are just prices? Virtually impossible.

This wouldn't work for both (I expect I know why):
Code: [Select]
/\${1}([\s\S]*?)\${1}|\${2}([\s\S]*?)\${2}/gm(the / /gm are wrappers for the regexp in javascript, the m and g specify multiline and global)
But:
Code: [Select]
/\${2}([\s\S]*?)\${2}/gmworks just fine for double tags. I just did not want to try and figure out a way to do it, I don't know them well enough. Then, it would pretty much require escaping dollar signs in the wiki text... I don't like that I want it to all work naturally.

Quote
Truth is, there are 2 'levels' of regular expressions that I know. Perl and sed use Extended regexp.

Javascript is using extended as of v1.5 I'm pretty sure. I've got extended regexps in this thing tested on all major browsers, so it must be. I expect there are a few fiddly differences here and there though.
« Last Edit: October 09, 2010, 09:52:34 pm by Bonk »

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #83 on: October 09, 2010, 09:49:13 pm »
This wouldn't work for both (I expect I know why):
Code: [Select]
/\${1}[\s\S]*?\${1}|\${2}[\s\S]*?\${2}/gm(the / /gm are wrappers for the regexp in javascript, the m and g specify multiline and global)
But:
Code: [Select]
/\${2}[\s\S]*?\${2}/gmworks just fine for double tags. I just did not want to try and figure out a way to do it, I don't know them well enough. Then, it would pretty much require escaping dollar signs in the wiki text... I don't like that I want it to all work naturally.

I .. think I see an error in your regexp. Specifically: "[\s\S]*?"  that "*?" is kinda weird and doesn't make sense to me. Shouldn't that just be *, which is 0-infinity?  ('?' is 0 or 1)


Also, I'm about to give you a headache: both US and Canadian $ formats have the $ in the Beginning of the number. (ie: $1). However, Americans use ',' to separate thousands (or groups of 10^3).

ie:
Canadian: $10400.00
American: $10,400.00

I hope it's not important for your work! :)


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: FYI: work in progress: OP+ 4.1
« Reply #84 on: October 09, 2010, 10:06:16 pm »
I understood *? to be a lazy match of the previous token as opposed to the greedy match of just *
As I understand it ? on its own is as you describe (0,1), but *? in sequence is (0,next match) and +? is (1,next match) - if I have it all right.

The other approach I have been taking (currently in the plugin is using +? instead, which penalises empty tags by not parsing them, still not sure if this is a good call or not though, as users may want to insert blank tag for access by other scripts or macros at some point...)

I'l give it a whirl without the ? to see if I can catch single dollar sign tags too, but I think it is just too evil.

International formats for currency don't matter so much to me. That is part of the whole point here, to come up with regexps and tags that do not require that complication to be considered. Just parse the math and let the user type lone dollar signs as usual. If I could parse math tagged in single dollar signs too that would be great, but just the thought of coming up with a regexp to do it makes my head hurt.

P.S. in the copy you quoted I left out the capturing brackets inbetween the tag tokens - a graver error. I was pasting in from old experiments.
« Last Edit: October 09, 2010, 10:17:35 pm by Bonk »

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #85 on: October 09, 2010, 10:08:40 pm »
Oh yeah. Lazy matches. I always miss that one. You win.

I understood *? to be a lazy match of the previous token as opposed to the greedy match of just *
As I understand it ? on its own is as you describe (0,1), but *? in sequence is (0,last match) and +? is (1,next match) - if I have it all right.

The other approach I have been taking (currently in the plugin is using +? instead, which penalises empty tags by not parsing them, still not sure if this is a good call or not though, as users may want to insert blank tag for access by other scripts or macros at some point...)

I'l give it a whirl without the ? to see if I can catch single dollar sign tags too, but I think it is just too evil.

International formats for currency don't matter so much to me. That is part of the whole point here, to come up with regexps and tags that do not require that complication to be considered. Just parse the math and let the user type lone dollar signs as usual. If I could parse math tagged in single dollar signs too that would be great, but just the thought of coming up with a regexp to do it makes my head hurt.


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Age

  • D.Net VIP
  • Commander
  • *
  • Posts: 2690
  • Gender: Male
Re: FYI: work in progress: OP+ 4.1
« Reply #86 on: October 10, 2010, 05:58:43 pm »
I was wondering if anything is going to be done to the fighter list?

FireSoul do you miss Ottawa and were ever a Senator's fan if so do you ever go and see them when in LA?

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #87 on: October 10, 2010, 07:06:05 pm »
I was wondering if anything is going to be done to the fighter list?

No. Why?

Quote
FireSoul do you miss Ottawa and were ever a Senator's fan if so do you ever go and see them when in LA?

Never liked hockey.. and I don't miss winter.. and I don't miss the horrible high tech industry problems Ottawa is living through. No.. I'm happy here in silicon valley.
I sometimes miss family and friends. I sometimes miss the food. I sometimes miss the countryside.  .. but you know? I'm good.


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline EschelonOfJudgemnt

  • Lt. Junior Grade
  • *
  • Posts: 259
Re: FYI: work in progress: OP+ 4.1
« Reply #88 on: October 12, 2010, 02:12:44 pm »
Just a quick thought guys.

I don't know how 'compatable' the early years ships are with SFC (i.e. if the weapons are different), but I've seen the shiplist # of ships limitation mentioned a few times now.

If early years ships are implementable (i.e. use basically the same weapons which are available in sfc), you could do a separate shiplist for the early years, with ship availability ending sometime before late/general war era.  The 4.1+ list would remain unchanged, but we'd be able to use the other shiplist if we wanted to play early era.

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #89 on: October 12, 2010, 03:15:36 pm »

This is true. It wouldn't be OP+ at all. It would be its own mod, with its own models and ships, but would be doable.
.. and I'm not the person to do this. ;)

Just a quick thought guys.

I don't know how 'compatable' the early years ships are with SFC (i.e. if the weapons are different), but I've seen the shiplist # of ships limitation mentioned a few times now.

If early years ships are implementable (i.e. use basically the same weapons which are available in sfc), you could do a separate shiplist for the early years, with ship availability ending sometime before late/general war era.  The 4.1+ list would remain unchanged, but we'd be able to use the other shiplist if we wanted to play early era.


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: FYI: work in progress: OP+ 4.1
« Reply #90 on: October 12, 2010, 04:21:01 pm »
It could be early years up to just before x-ships.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Age

  • D.Net VIP
  • Commander
  • *
  • Posts: 2690
  • Gender: Male
Re: FYI: work in progress: OP+ 4.1
« Reply #91 on: October 12, 2010, 04:24:09 pm »
I was wondering if anything is going to be done to the fighter list?

No. Why?

I was just wondering as some of the fighter like Fed mid era are under powered and late era ISC are overpowered imho.

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #92 on: October 12, 2010, 07:07:46 pm »

I see. I don't currently have an opinion. Make a case, perhaps?

-- Luc

I was wondering if anything is going to be done to the fighter list?

No. Why?

I was just wondering as some of the fighter like Fed mid era are under powered and late era ISC are overpowered imho.


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline KBF-Crim

  • 1st Deacon ,Church of Taldren
  • Global Moderator
  • Commodore
  • *
  • Posts: 12271
  • Gender: Male
  • Crim,son of Rus'l
Re: FYI: work in progress: OP+ 4.1
« Reply #93 on: October 12, 2010, 09:59:00 pm »
Welcome back FS!!!!!


Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #94 on: October 12, 2010, 11:13:05 pm »


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Rhaz

  • Lt. Junior Grade
  • *
  • Posts: 374
Re: FYI: work in progress: OP+ 4.1
« Reply #95 on: October 18, 2010, 09:21:11 pm »
welcome back FS!  I look forward to your latest creation

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #96 on: October 18, 2010, 10:07:47 pm »
welcome back FS!  I look forward to your latest creation

It'll take a few months.. I'm currently redoing all the pirates' loadouts and it's taking forever.
Then there's R11 and R12 to cover. ;p


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Magnum357

  • Lt.
  • *
  • Posts: 641
Re: FYI: work in progress: OP+ 4.1
« Reply #97 on: November 03, 2010, 04:24:52 pm »
Firesoul, wow!  I haven't seen you online in years.  Great to see ya again.  I do have one question though,
will this OP 4.1 have a "no models" version?  My system just can't handle a lot of graphically intense models. 
I was so happy that you guys made a "no models" version of 4.0.

Also, I can understand what you mean about the Pirate slots, there are a huge numer of ships in those
sections.  I worked on a personal mode called "BAM" (Basic Action Mode) that only has a fraction of the models that 4.0 has, but the pirate slot took me the longest to get done (and I only have two cartels added to make it simple)
so I know how it goest with all the option mounts and variations of Pirate vessels.  The intended perpose
of "BAM" (mostly just for GSA games) was to give beginning players a very "balanced" mode, but after I
released it, most players didn't think much of it.  I could give ya a copy of it if you wish to see what you think?
"I sure am glad I like SFB!" - Magnum357 (me)

Offline FireSoul

  • Modder of shiplists
  • Lt. Commander
  • *
  • Posts: 1306
  • mew.
    • http://klingon.lostexiles.net/
Re: FYI: work in progress: OP+ 4.1
« Reply #98 on: November 03, 2010, 09:23:36 pm »
Firesoul, wow!  I haven't seen you online in years.  Great to see ya again.  I do have one question though,
will this OP 4.1 have a "no models" version?  My system just can't handle a lot of graphically intense models. 
I was so happy that you guys made a "no models" version of 4.0.

I'm sorry Magnum. There won't be a no models version. I had to recreate the installer since the old sources are lost, (I lost Coopace 4.0's sources too, incidently!) and I don't intend to redo all of the work. Besides, there are 2 other arguments to drop the no models version:
1- it's been 9 years since OP was released. By Moore's law, computers are now about 2^6 (64!) times more powerful for the same cost.
2- The current plan is to include some model fixes to such things as planets to fix some problems Dizzy mentioned.
Hey Dizzy! Weren't you going to look for the models? :)

Quote
Also, I can understand what you mean about the Pirate slots, there are a huge numer of ships in those
sections.  I worked on a personal mode called "BAM" (Basic Action Mode) that only has a fraction of the models that 4.0 has, but the pirate slot took me the longest to get done (and I only have two cartels added to make it simple)
so I know how it goest with all the option mounts and variations of Pirate vessels.  The intended perpose
of "BAM" (mostly just for GSA games) was to give beginning players a very "balanced" mode, but after I
released it, most players didn't think much of it.  I could give ya a copy of it if you wish to see what you think?

I'm well into this project, recently having plotted out the loadouts for the BCH ships. I think I'm doing well. Was there something you wanted to suggest, specifically?


Author: OP+ Mod
Maintainer: Coopace
Author: Fests+ for OP
Creator: SFC-OP Mini Updater
Maintainer: SFC-EAW for OP Campaigns
Kitbash: SFC2 models

Offline Magnum357

  • Lt.
  • *
  • Posts: 641
Re: FYI: work in progress: OP+ 4.1
« Reply #99 on: November 04, 2010, 02:33:56 am »
The only wishlist/suggestion I can think about at this time is X weapons.  In BAM, I only added X1 ships
(Taldrens X2 ships just WAY to powerful for my taste) but I took out all of the Phaser-X's since according
to SFB-X1 rules, they officially eliminated the overloaded X-phaser. 

Instead, I simply replaced the Phaser-X with Phaser-1's and added an additional Phaser-3 to simulate
a SFB defense pulse phaser.  May I suggest thos for 4.1?
"I sure am glad I like SFB!" - Magnum357 (me)