Struggling to get a game expertise calculator running inside of tiddlywiki. is it possible?

hey quick background I’m making my wiki for a PC game i play to have maps, guides, ect available online and offline all in one place and organized how i want it.

Im trying to get an expertise calculator working for my tiddlywiki. Im able to get it working (dont mind the broken images havent fixed them yet) in an html file externally. I was hoping to get it working inside of tiddlywiki that way i could use it offline as well and on the go on my ipad or iphone if need be. any guidance on how to do this? i was able to get the formatting into a tiddler and have it working i just cant get the script running i guess to change pages and actually have it function…

Should also mention im very new to tiddlywiki and html, ive been only really needing basics so far with my wiki so treat my knowledge as if im 5 lol

Without even looking at your tiddler content, the reason you “cant get the script running” is because TiddlyWiki does not allow processing of <script>...</script> blocks embedded in tiddler content.

This is done for security reasons: if such embedded scripts were permitted, then it would be possible for malicious code to be imported into your TiddlyWiki from 3rd-party sources and, because those scripts would be running in a local context, they would have full access to your browser information, including saved passwords, etc.

If your javascript code is being used to do math calculations, it may be possible to replace that code with TiddlyWiki filter syntax to perform those calculations (see https://tiddlywiki.com/#Mathematics%20Operators).

-e

its not math equations (https://swglegends.com/expertise-calculator.php) that is what it is. basically chose your proffession for the game and then it allows you to alocate your points and see where you want to put them. I was trying to use chatgpt (i know not a great idea or help) and it was able to clean up my format tiddler for the look of the main title image screen for a tiddler and that was good. it also had told me about the thing and “converted” it for me to work. however all that did was make it so my wikis background was that of the first screen of the calculator and it only functioned for a minute on that screen. where as i wanted it to function when you were on the tiddler

@kasek welcome to talk.tiddlywiki

There are many ways to integrate TiddlyWiki with other projects. It can be as simple as using an iframe to see the site in widows within your wiki (if the host allows it) to full integration. However this is often done by reference to an open source community and with open access and instructions. Simply nominating a particular website and wanting to copy it into your wiki needs expertise and could even be violating copywrite.

  • Intergrating another sites features into tiddlywiki depends on the nature of the site and knowledge about tiddlywikis approach, which has features to support its interactive behaviour.

A lot of people have built gameworlds with tiddlywiki and will most likely have set up similar solutions. But I expect you will have more sucess building a new solution within tiddlywiki that is similar to the one you linked to. I suggest reviewing what that site does and start building a replacement if there is nothing too complex within it.

There is many many versions of the calculator online that is just one I referenced as an example of what it is. This game has long since been shut down and now it’s just emulated by fans.

From my understanding the iframe would need internet from when I had looked at that unless I misunderstood which doesn’t work for me.

Yes, I am not a gamer and dont know what the calculator needs to work, but expect its quite simple. There are a lot of tiddlywiki users who I expect have done something similar. I think a lot of the gamers that are in the tiddlywiki discord can possibly help.

  • If you start building it and need help come back here with specific questions and we can help you

Someone with expierence here may join the conversation.

Ya I asked on discord and was suggested to come here. As I mentioned I asked ChatGPT to write me up an example as I have no clue how to even begin. It did but doesn’t function properly go figure :laughing:. Hence why I came here to see how to get started on making a working version.

ChatGPT’s version when I open my tiddlywiki appears, functions for a second and then stops and the calculator becomes the background (instead of white) and then can’t be clicked. So it must be close but missing something.

Fair enough, but I think you are realy asking for a solution rather than how to do something. Using ChatGPT is rarely a good solution without first having a good understanding.

Do you understand the logic behind the calculator?, how different options give different points? Then you need to find away to represent it in tiddlywiki, and add that simple point and click interface. If you can find someone in the community that has already done it is your best bet, but the chance its much similar to your example uncertian.

If you can use tiddlhost and share your attempts at making it work, may help others help you.

I can put it on tiddlyhost later and show what part im at. Again I came here to see what’s missing as it’s almost functioning. So sure I’m looking for a solution as I don’t understand how it works for all of 3 seconds and stops.

Why put it in a tiddlywiki - you could just use a html page locally

Because I wanted my wiki to be like a game info database for my quests, badges, achievements, maps, macros, commands everything.

I’m just redoing it ground up right now changing it and see if I can figure out where it went wrong.

So this can all get ignored now and will see if my new iteration works

this is what i have so far

https://drive.google.com/file/d/1lhO9-xg5Xfmhl-LY7CObXnXxAOpzJxBK/view?usp=drive_link

Could you perhaps use an external calculator in an iframe? I figure you only want manually type in digits and to see some resulting answer from it, so no real integration would be needed. Or maybe I misunderstand your use case.

picked up this from Embeddable Calculator Widget

<div style="width:50px;height:50px;background-image:url('https://linangdata.com/calculatorEmbed/icons/48x48.png')">
   <iframe id="linangcalc" 
   src="https://linangdata.com/calculatorEmbed/embeddable.html?placement=right" 
    width="400" height="450" scrolling="auto" frameBorder="0" allowTransparency="true"
     style="border:0;position:absolute;opacity:1.0;">
  </iframe>
</div>

EDIT: I decided to actually read what you’re asking for :sweat_smile: - how about that- and, sorry, just noted that you said:

that way i could use it offline as well

EDIT 2: …I probably don’ t even understand what a game expertise calculator is…

You could try the mathcell plugin? Or the formula plugin?

Do you want to connected tiddlers to items in the calculator?
If not you could write the calculator as a html page, import the whole page into a tiddler then use that tiddler as the source of an iframe, that way everything would be inside the tiddlywiki.

I hadn’t thought that far as I wanted to get it working first :stuck_out_tongue:. So far my new one I’m still working on the layout and then I think it should be fairly easy to fill the rest in. However I still don’t know how to get it working in tiddlywiki. If I did it as an iframe I’m guessing I’d ether have to A point it to the directory the file is so then would only work on the 1 device or B host it somewhere so that it could be accessible from any device?

My idea for my tiddlers was to have image links for the images to keep the wiki size down. (Currently implemented) then as well keep a back up of all
My images and wiki on an external drive and that way if I’m offline and have the drive I can still read it and see the images but at the same time I can remove the hdd and still show images. I did it to one tiddler and changed the online like to have a bunch of random digits and the image still loaded so I think it works