|
Post by evilspock on Feb 24, 2011 21:50:11 GMT
Greetings!
I just discovered this website and I love the idea of creating my own game books.
I've been looking through the code for combat_full. I am a former computer programmer so I've been able to follow it pretty well. My question is:
How does this function "generate" the links in the book, such as "Attack" and "Escape"? I can see how the text itself is generated through &print statements, but I can't figure out how the link is created.
Edit:
I just tried copying the text in FFCombat to my own library and these links disappeared. There is definitely some "jiggery-pokery" going on here. Any help would be appreciated.
Thanks a lot!
Evil Spock
ps. Fantastic job on the website!
|
|
|
Post by Zaphod Beeblbrox on Mar 6, 2011 11:49:35 GMT
Hi, sorry to take so long to reply :-)
First of all, make sure you have included the relevant support files for combat_full (I can't remember which ones are used but definitely General_Lib is required to make combat_full work). I haven't documented Including files yet, but I hope it's fairly self explanatory (you have 4 boxes, at the bottom of the SEL editor, 2 show the files currently included from you own library and the hosted library for the file you are currently working on, the other 2 show th files available for inclusion). Also note I haven't implemented namespacing so conflicting function names will produce unpredictable results). This may well solve the issue you are having.
Secondly &combat_full has a very large parameter list, and each parameter must be filled (use an empty string if you don't want any value passed for that parameter). Check carefully your parameter list.
If both these criteria are correct please let me know if it's still not working.
You might want to simply 'Include' the combat library and use it like that but I'm guessing you want to have a go at modifying it?
I'll have a go at doing a copy/paste excercise myself and let you know what results I get.
|
|
|
Post by Zaphod Beeblbrox on Mar 6, 2011 12:02:33 GMT
Right had a quick go and am having same trouble as you are. Will locate issue.
|
|
|
Post by Zaphod Beeblbrox on Mar 6, 2011 12:18:35 GMT
Ha! Found the problem. The problem is in the View function itself - when you View a library if that library outputs any ABML tags (e.g. the code that should generate the 'Attack' OPTION tag) it is of course in XML style tags therefore the View function is thinking it's a bad HTML tag and doesn't display it - and therefore you are missing all the critical ABML tags in your copy/paste! Doh!
O.K. I'll see what I can do to fix this but for the time being if you really want to see/copy how it works the best I can suggest is use the View function then 'View Source' on your browser (the tags show up there). Sorry!
|
|
|
Post by Zaphod Beeblbrox on Mar 6, 2011 12:40:57 GMT
Resolved. View Function now outputs the full and correct functions including ABML and HTML markups
|
|
|
Post by Zaphod Beeblbrox on Mar 6, 2011 12:50:07 GMT
OOps overlooked something (i.e. like making the regex match all instances on a line doh). *now* it's resolved :-) (tested copy/paste of combat_full to a private library now works)
|
|
|
Post by evilspock on Mar 6, 2011 20:19:27 GMT
Cool. Thanks for all your hard work on this. I'm hoping to publish a novel-length book at some time in the future. I'm plugging away at it a little each day Good luck with the new forums!
|
|
|
Post by Zaphod Beeblbrox on Mar 7, 2011 1:09:38 GMT
That's fantastic I look forward to seeing it :-)
Please use the backup facility at regular intervals though! I have some pretty big changes planned for the future, and there is some possibility of data loss during implementations despite my best efforts.
Just out of interest is there any particular idea you would like to see working on the site?
(One thing I'm most concerned about is providing a backup that generates plain HTML stripping out all ABML tags and replacing TT tags with a simple anchor tag to different references, which I'm sure any writer would like)
|
|