Bugs

September 20, 2016

It appears a few bugs crept into the card generator and that meant users couldn’t edit or copy cards. The bug has been successfully removed.

Filed under: Warhammer Quest — admin @ 10:01 am

New Functionality

September 14, 2016

I’ve made a few more changes to the card generator, not only can you add images to more card types (Monster and Treasure) you can now download the cards as PDF files (with back covers). That means no more guessing what size to print at, just make sure you uncheck “fit to page”.

In addition I’ve now given people the opportunity to login to the site, what this means is the cards you create are then stored in the site and can be accessed/edited at a later date. As well as the cards being stored you can choose to make the card Public (set to Public by default). The public cards will appear in a gallery, people can download the cards or make copies and amend them.

If you want to see your cards there is an option in the navigation “Your Cards”.

Filed under: Warhammer Quest — admin @ 8:17 pm

Warhammer Quest

September 4, 2016

Good news! The card generators have had an overhaul. They now produce cards at twice the previous resolution, the monster events cards now support images as do the treasure cards.

Another improvement is that cards produced are now available as PDF files with crop and registration marks (because paper/card doesn’t always feed straight). If you’re using the PDFs please remember to turn off scaling/fit to page (otherwise they’ll be the wrong size).

Filed under: Warhammer Quest — admin @ 3:38 pm

I’ve not had a chance to play the new version yet so I don’t know what it’s like. If there are cards or tokens that you would like custom version for let me know, send me a scan of what you would like a new version of (scan at 300dpi…front and back would be great….the restrictions allowing “GW” may not be allowing designs to be duplicated…which would be a pity).

Filed under: Warhammer Quest — admin @ 5:18 pm

I’ve been working amending the card generator so it produces higher resolution cards (300dpi up from 150). The cards looks much better, I’ve also included the back of the cards too. I’m working on adding image support for both the monster event cards and treasure cards.

The updated room card.

Filed under: Warhammer Quest — admin @ 5:14 pm

Magic Cards

January 30, 2016

Hello,

I’ve had a request to amend the functionality of the magic cards. You can now set the “Type” text independently of the colour. This means the magic cards are now multilingual.

Filed under: Warhammer Quest — admin @ 2:45 pm

Generic Card Creation

September 24, 2015

I’m considering putting together a tool so people can create any type of card for any type of game. I’m thinking about having basic card types so WHQ will be included but what other games should have basic cards? I’ll be adding a facility so that cards can be saved for editing later and possibly making the listings public/private, maybe even a voting system.

What do people think? Leave me a comment and let me know.

Filed under: Uncategorized — admin @ 9:39 am

The card builders are back up and running, sorry for any inconvenience caused.

Filed under: Warhammer Quest — admin @ 11:02 pm

I’d been looking for a way of using the jQuery UI datepicker the same way that the Google Analytics datepicker works. Unfortunately I hadn’t found any solutions that I really liked. After a little more searching I found a tantalising piece of code that is already part of the jQuery UI Date Picker.

The piece of code is actually and Option, in this instance beforeShowDay. As the name suggests this piece of code is executed before the day is drawn. What I’ve done is pass the date of the day being drawn into the function and compared the date with some values I recorded earlier.

Based on some simple logic an array is returned (see the jQuery UI API documentation for more details), this important part for us is the class being added to the day (red for one selected period, blue for the second and split if any of the dates intersect.).

Now is this is great I can draw different coloured selected regions based on some stored dates. Now to make the ranges changeable.

I went back to the dates I was already storing. I knew that using the onSelect option I could use the date returned to my advantage. I stored the selected date in the object I’m using to hold the date ranges. But how to define the start and end?

I created a couple of input fields (a start and end) and a variable to track which field was being populated. On select the “selected field” is highlighted and the corresponding element in the date object is filled. Once the selection of a date is complete the focus is advanced to the next field.

The next step was simple I added a checkbox whose state determined if we were populating the first date range or another and added a couple more input boxes.

The resulting code you can find below and you can download a working example of the date picker. I think it’s a good starting point and you may wish to expand it’s functionality.

var dateRanges={
		"StartDate": new Date( 2013,11,18 ),
		"EndDate": new Date(2013,11,25), 
		"CompStartDate": new Date(2013,11,10 ),
		"CompEndDate": new Date(2013,11,17)
	};
var selection=1;
var range=1;
var compare=0;
var textMonths=new Array( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );

jQuery(document).ready(function(){

	jQuery("#selectDates").datepicker({
					
		changeMonth: true,
		dateFormat: 'yy/mm/dd',
		numberOfMonths: 3,
		beforeShowDay: function (date){
						
			if (date >= dateRanges.StartDate && date <= dateRanges.EndDate ) 
			{
								
				if (date >= dateRanges.CompStartDate && date <= dateRanges.CompEndDate && compare==1 )
				{
								
					return [true, 'split', ''];
								   
				}
								
				return [true, 'red', ''];
								
			}
							
			if (date >= dateRanges.CompStartDate && date <= dateRanges.CompEndDate && compare==1 ) 
			{
							
				if (date >= dateRanges.StartDate && date <= dateRanges.EndDate )
				{
								
					return [true, 'split', ''];
								   
				}                
								
				return [true, 'blue', ''];
								
			}       
							
			return [true, '', ''];
							
		},
		onSelect: function( selectedDate ){

			parts=selectedDate.split('/');

			if ( selection==1 )
			{

				if ( range==1 )
				{

					dateRanges.StartDate = new Date( parts[0], (parts[1]-1), parts[2] );

					jQuery('#fldRangeStart').val( dateRanges.StartDate.getDate()+' '+textMonths[dateRanges.StartDate.getMonth()]+' '+parts[0] );

				}
				else
				{

					dateRanges.CompStartDate = new Date( parts[0], (parts[1]-1), parts[2] );

					jQuery('#fldCompStart').val( dateRanges.CompStartDate.getDate()+' '+textMonths[dateRanges.CompStartDate.getMonth()]+' '+parts[0] );                    

				}

			}

			if ( selection==2 )
			{
						
				if ( range==1 )
				{
				
					dateRanges.EndDate = new Date( parts[0], (parts[1]-1), parts[2] );

					jQuery('#fldRangeEnd').val( dateRanges.EndDate.getDate()+' '+textMonths[dateRanges.EndDate.getMonth()]+' '+parts[0] );

				}
				else
				{

					dateRanges.CompEndDate = new Date( parts[0], (parts[1]-1), parts[2] );

					jQuery('#fldCompEnd').val( dateRanges.CompEndDate.getDate()+' '+textMonths[dateRanges.CompEndDate.getMonth()]+' '+parts[0] );

				}

			}

			selection=selection==1 ? 2 : 1;

			if ( selection==2 )
			{

				if ( range==1 )
				{

					jQuery('#fldRangeEnd').addClass('focusBorder');  
					jQuery('#fldRangeStart').removeClass('focusBorder');

				}
				else
				{

					jQuery('#fldCompEnd').addClass('focusBorder');
					jQuery('#fldCompStart').removeClass('focusBorder');

				}

			}
			else
			{

				if (range==1 )
				{

					jQuery('#fldRangeStart').addClass('focusBorder');
					jQuery('#fldRangeEnd').removeClass('focusBorder');

				}
				else
				{

					jQuery('#fldCompStart').addClass('focusBorder');
					jQuery('#fldCompEnd').removeClass('focusBorder');

				}
			
			}
			
		}

	});

	jQuery('#fldRangeStart').click(function(e){

		e.preventDefault();
		selection=1;
		range=1;
		jQuery('#fldRangeStart').addClass('focusBorder');  
		jQuery('#fldRangeEnd,#fldCompStart,#fldCompEnd').removeClass('focusBorder');

	});

	jQuery('#fldRangeEnd').click(function(e){

		e.preventDefault();
		selection=2;
		range=1;
		jQuery('#fldRangeEnd').addClass('focusBorder');  
		jQuery('#fldRangeStart,#fldCompStart,#fldCompEnd').removeClass('focusBorder');

	});    

	jQuery('#fldCompStart').click(function(e){

		e.preventDefault();
		selection=1;
		range=2;
		jQuery('#fldCompStart').addClass('focusBorder');  
		jQuery('#fldCompEnd,#fldRangeStart,#fldRangeEnd').removeClass('focusBorder');

	});

	jQuery('#fldCompEnd').click(function(e){

		e.preventDefault();
		selection=2;
		range=2;
		jQuery('#fldCompEnd').addClass('focusBorder');  
		jQuery('#fldCompStart,#fldRangeStart,#fldRangeEnd').removeClass('focusBorder');

	});    

	jQuery('#fldRangeStart').addClass('focusBorder');			
				
	jQuery('#fldCompare').click(function(){
				
		compare=compare==1 ? 0 : 1;
				
		if ( compare==1 )
		{

			jQuery('.compfields').show();
			jQuery('#selectDates').datepicker('refresh');
			
		}
		else
		{
		
			jQuery('.compfields').hide();
			jQuery('#selectDates').datepicker('refresh');
			
		}
				
	});

	jQuery('#fldRangeStart').val( dateRanges.StartDate.getDate()+" "+textMonths[dateRanges.StartDate.getMonth()]+" "+dateRanges.StartDate.getFullYear() );
	jQuery('#fldRangeEnd').val( dateRanges.EndDate.getDate()+" "+textMonths[dateRanges.EndDate.getMonth()]+" "+dateRanges.EndDate.getFullYear() );
	jQuery('#fldCompStart').val( dateRanges.CompStartDate.getDate()+" "+textMonths[dateRanges.CompStartDate.getMonth()]+" "+dateRanges.CompStartDate.getFullYear() );
	jQuery('#fldCompEnd').val( dateRanges.CompEndDate.getDate()+" "+textMonths[dateRanges.CompEndDate.getMonth()]+" "+dateRanges.CompEndDate.getFullYear() );				
	
	jQuery('.compfields').hide();
	
});
.red a
{

	background: #ff0000 none 0 0 no-repeat !important;

}

.blue a
{

	background: #0000ff none 0 0 no-repeat !important;
	color: #fff !important;

}

.split a
{

	background: #ff00ff none 0 0 no-repeat !important;

}
		
.datedsps
{

	width: 75px;
	font-size: 11px;

}

.focusBorder
{

	border: 2px solid #ff0000;

}
-

Compare Previous Period

-

Filed under: Programming — Tags: , , , , , , — admin @ 2:50 pm

What we all need right now

September 22, 2011

What we all need right now is to feel better about our selves. I know that sounds hard with the economic situtation the way it is but hear me out. Take what you’ve heard about banks and money and put them on the back burner because what really matters is people; you, me, bankers even politians. You might be thinking what do people have to do with money well….everything, the people trading on the floors of our markets are people just like you and me. What they need right now is the feel better about themselves, to feel happy and confident about what they’re doing. When they aren’t happy the markets struggle.

How do we ordinary people fit in, unsurprisingly money, we spend it and it makes the economy go round, I understand this is difficult because we’re all worried about what will happen to our jobs. In lies the problem we are making things worse by not spending, the countries growth requires us to buy things, lets face it the money is making you any more in the bank is it? You might as well have the things you want.

So how can we feel better, my first thought is an easily accessible one, more pop music, so roll on X Factor give us something fun to listen to. Or how about some home improvements maybe the BBC will give us some new shows to enjoy, where we live has a great impact on how we feel so a spruce up might do just the job.

I imagine you can think of lots of other ways of feeling better but it’s what we should all be aiming for.

Filed under: Thoughts for the day — admin @ 7:17 pm

About me

Jonathan Spicer

My CV

My curriculum vitae and a wealth of other facts about me.

Warhammer Quest tools

Flickering flame effect Flickering flame effect Flickering flame effect

Powered by WordPress